Skip to main content

Login result token

After a successful login, login() returns an AirLoginResult. Its token property is a JWT issued by AIR with these claims:
The same token is available later from getAccessToken(). To trust it on your backend, send it as Authorization: Bearer <token> and validate it against AIR’s JWKS for your environment:

Session management

AIR Kit manages sessions for you. Returning users are logged in automatically for up to 30 days, unless they logged out.
  • To require users to log in every time they visit your app, set skipRehydration to true when initializing the SDK.
  • Call isLoggedIn to check the login state of a user.
  • To log out, call logout().
  • To change locale or currency after initialization, call updateSessionConfig(). See Language support and Other options.

User information

getUserInfo()

Retrieves detailed information about the currently logged-in user. Method Signature:
Returns:
Requirements:
  • User must be logged in
Example: