Select to view content in your preferred language

Experience builder Webmap app SSO

524
1
05-17-2023 08:08 PM
Labels (1)
balan385
New Contributor

Hi, I create a webmap app in experience builder and deployed in IIS. Then plan to pass token to this exp. builder app from another custom app.  Then that token will be use for login credential to exp. builder app.

Anyone got experience do SSO to experience builder app, without user keyin login credential.

0 Kudos
1 Reply
XiaodongWang
Esri Contributor

If you already have a token of portal, you can create a session and register it into ExB.
Reference code:

import { SessionManager } from 'jimu-core'
import { UserSession } from '@esri/arcgis-rest-auth'

const session = new UserSession({
  portal: portalUrl, //https://www.arcgis.com/sharing/rest/
  clientId: clientId,
  token: token,
  tokenExpires: new Date(tokenexpires),
  ssl: true,
  username: username
})
SessionManager.getInstance().addOrReplaceSession(session)

 
BTW: Which version of ExB dev edition are you using?

0 Kudos