Authentication - Backend Server
A high-level overview of how authentication works with a backend server.
Login
Steps:
- The user clicks the Login button on your website or application.
- The user is sent to the Login Endpoint implemented by your backend server.
- The backend server creates an Authorization Request and redirects the user to the Wristband Authorize Endpoint.
- Wristband validates and records the Authorization Request and redirects the user to the Wristband-hosted Login page.
- The user provides their credentials to authenticate.
- The Login Page redirects to your application's Callback Endpoint with an authorization code.
- The Callback Endpoint calls Wristband's Token Endpoint to exchange the authorization code for an access token.
- The Callback Endpoint establishes an application session and sets a session cookie.
- The user is redirected to your application's entry point.
Logout
Steps:
- The user clicks the Logout button within your application.
- The user is sent to the Logout endpoint of your backend server.
- The backend server destroys the session cookie.
- The backend server calls the Revoke Token Endpoint to revoke the refresh token.
- The user is redirected to the Wristband Logout Endpoint.
- Wristband destroys the authentication session and redirects the user to your application's Login endpoint.
Updated 7 days ago