useStytchMemberSession hook.
If the user is not signed in, the returned value will be null.
In non-React environments, use the session.getSync method to get the Session.
Return Value
The current Session.
Show properties
Show properties
Globally unique UUID that identifies the Session.
Globally unique UUID that identifies a specific Member.
An array of authentication factors that comprise a Session.
Show properties
Show properties
The type of authentication factor. The possible values are:
email_otp, impersonated, imported, magic_link, oauth, otp, password, recovery_codes, sso, trusted_auth_token, or totp.The method that was used to deliver the authentication factor. The possible values depend on the type:
email_otp: Onlyemail.impersonated: Onlyimpersonation.imported: Onlyimported_auth0.magic_link: Onlyemail.oauth:oauth_google,oauth_microsoft,oauth_hubspot,oauth_slack, oroauth_github. You may see an ‘exchange’ delivery method when a non-email-verifying OAuth factor originally authenticated in one organization is exchanged for a factor in another organization. This can happen during authentication flows such as session exchange. The non-email-verifying OAuth providers are Hubspot, Slack, and Github. Google is also considered non-email-verifying when the HD claim is empty. The possible exchange values areoauth_exchange_google,oauth_exchange_hubspot,oauth_exchange_slack, oroauth_exchange_github. The final possible value isoauth_access_token_exchange, if this factor came from an access token exchange flow.otp: Onlysms.password: Onlyknowledge.recovery_codes: Onlyrecovery_code.sso:sso_samlorsso_oidc.trusted_auth_token: Onlytrusted_token_exchange.totp: Onlyauthenticator_app.
The timestamp when the factor was initially authenticated.
The timestamp when the factor was last authenticated.
The timestamp when the factor was last updated.
Either
PRIMARY or SECONDARY. Secondary factor types include otp, totp, and recovery_codes. All other factors are primary.Information about the Google OAuth factor, if one is present.
Information about the Microsoft OAuth factor, if one is present.
Information about the Hubspot OAuth factor, if one is present.
Information about the Github OAuth factor, if one is present.
Information about the Slack OAuth factor, if one is present.
Information about the Google OAuth Exchange factor, if one is present.
Show properties
Show properties
The globally unique UUID of the email address.
Information about the Hubspot OAuth Exchange factor, if one is present.
Show properties
Show properties
The globally unique UUID of the email address.
Information about the Github OAuth Exchange factor, if one is present.
Show properties
Show properties
The globally unique UUID of the email address.
Information about the Slack OAuth Exchange factor, if one is present.
Show properties
Show properties
The globally unique UUID of the email address.
Information about the TOTP-backed Authenticator App factor, if one is present.
Show properties
Show properties
Globally unique UUID that identifies the TOTP instance.
Information about the trusted auth token factor, if one is present.
Show properties
Show properties
The ID of the trusted auth token.
organization_id
The globally unique UUID that identifies the Organization associated with the Session.
organization_slug
The unique URL slug of the Organization associated with the Session.
A list of the roles associated with the Session.
Members may inherit certain roles depending on the factors in their Session.
For example, some roles may only be active if the member logged in from a specific SAML IDP.
The timestamp when the Session was created. Values conform to the RFC 3339 standard and are expressed in UTC, e.g.
2021-12-29T12:33:09Z.The timestamp when the Session was last accessed. Values conform to the RFC 3339 standard and are expressed in UTC, e.g.
2021-12-29T12:33:09Z.The timestamp when the Session expires. Values conform to the RFC 3339 standard and are expressed in UTC, e.g.
2021-12-29T12:33:09Z.The custom claims map for a Session. Claims can be added to a Session during a Sessions authenticate call.
Whether the Member data is from persistent storage.