getSessionInfo

client.getSessionInfo()

About this command

Check the state of the current’s SSO session and return an SSO session object.

Examples

client
  .getSessionInfo()
  .then(sessionInfo => {
    if (sessionInfo.isAuthenticated) {
      // Do something
    } else {
      // Do something else
    }
  })
  .catch(err => console.error(err))

Response

Type: Promise<SessionInfo>

SessionInfo

isAuthenticated boolean

Whether the profile is authenticated.

name string

The full name of the profile.

email string

The email address with which the profile has logged-in.

lastLoginType string

The type of the last authentication.

hasPassword boolean

Whether the profile has used a password to logged-in.

socialProviders string[]

List of the social providers used by the profile.

Feedback