How to authenticate your app against the Tenn.Pay platform using OIDC and call the API.
1. Configure your OIDC client #
Use any compliant OIDC library (e.g. oidc-client / oidc-client-ts on web, AppAuth on mobile). Flow: Authorization Code + PKCE.
|
Setting |
Value |
|---|
|
Setting |
Value |
|---|---|
|
Authority / Issuer |
|
|
Client ID |
|
|
Response type |
|
|
Redirect URI |
|
|
Post-logout redirect URI |
|
|
Silent renew URI |
|
|
Scopes |
|
Standard discovery endpoints (under the issuer):
-
/connect/authorize -
/connect/token -
/connect/userinfo -
/connect/endsession -
/connect/revocation
2. Get an access token #
-
Trigger
signinRedirect()— the user is bounced to the auth server, signs in, and is redirected back to yourredirect_uriwith acode. -
On the callback page, call
signinRedirectCallback()to exchange the code for tokens. -
Read
user.access_token(JWT) from the returned user object.
3. Call the API #
Attach the access token to every request:
Authorization: Bearer <access_token>
That is the only auth requirement. The user identity is taken from the token — you do not need to pass any user ID or individual ID alongside it.
