These libraries handle PKCE generation, redirects, token storage, and silent renewals automatically.
Prerequisites
Reach out to Lobyco to register the website as a public OAuth client in Lobyco Identity solution.The following details must be provided during registration:
- Client name (application name)
- Redirect URIs — the exact URLs where users are redirected after authentication (for example https://example.com)
- IDENTITY_BASE_URL
- CLIENT_ID
Integration Steps
1
Redirect the User to the Authorization Endpoint
2
Exchange the Authorization Code for Tokens
- access_token — for accessing Lobyco APIs
- id_token — containing user identity information (if OIDC enabled)
- refresh_token — for renewing tokens (if allowed)
3
Use the Access Token in API Requests
Authorization: Bearer {ACCESS_TOKEN}When validating tokens on the back end, choose the correct validation method depending on the token type:JWT access tokens:validate locally using the issuer’s jwks_uri.Opaque access tokens:call the introspection endpoint (for example /oauth2/introspect)
Scopes required for Sign-in and Sign-up pages
- openid
- offline_access
Scopes required for MyProfile web page
- openid
- offline_access
- profile
- profile.edit