Authentication - Native

A high-level overview of how authentication works with a native mobile or desktop app.

Login

Steps:

  1. The user clicks the Login button within your native application.
  2. The native app creates an Authorization Request and sends the user to a browser for redirection to the Wristband Authorize Endpoint.
  3. Wristband validates and records the Authorization Request and redirects the user to the Wristband-hosted Login page.
  4. The user provides their credentials to authenticate.
  5. The Login Page redirects back to the native app's Callback Endpoint with an authorization code via deep linking.
  6. The Callback Endpoint calls Wristband's Token Endpoint to exchange the authorization code for an access token.
  7. The Callback Endpoint stores the access token and refresh token in secure storage.
  8. The user is redirected to your native app's entry point.

External IDP Login Flow

Logout

Steps:

  1. The user clicks the Logout button within your native app.
  2. The app invokes a logout() function, destroying tokens in secure storage.
  3. The app calls the Revoke Token Endpoint to revoke the refresh token.
  4. The user is redirected to the Wristband Logout Endpoint.
  5. Wristband destroys the authentication session and redirects the user to your app's Login screen via deep linking.

Native Logout Flow