Logout
The OpenID Connect RP-Initiated Logout 1.0 flow is designed to securely end the authenticated web sessions created from the Authorization Code Flow.
Key Concepts and Terminology
- Client (Application): The app requesting access to user resources, which must include a confidential backend.
- Confidential Client: Has a secure backend that can safely store credentials.
- Authorization Server (Jack Henry Authentication Framework): Authenticates the user.
- Redirect URI: Endpoint in the client’s backend that receives the state after logout.
When to Use Logout Flow
- Server-side web applications with a backend that can securely store credentials.
- Mobile or SPAs that interact with their own secure backend (which is the Confidential Client). The frontend never directly calls Jack Henry APIs; instead, it communicates with the backend, which then uses the Authorization Code Flow.
Step-by-Step Logout Flow
with client_id OR id_token_hint
post_logout_redirect_uri
state User->>Auth_Server: Ensure authenticated and validate parameters Auth_Server->>User: Redirect to provided post_logout_redirect_uri or Auth_Server logout URL (redirect) User->>Client_Backend: Browser redirect with state Client_Backend->>Client_Backend: Validate state parameter and end the user session end
1. Prerequisites
Only applies to authorization code flow authentication and assumes the user has already fully authenticated in that flow.
Any post_logout_redirect_uri values must be pre-registered as a callback URL for the application.
2. Logout Request
The client’s backend directs the user’s browser to the Jack Henry Authorization Server. This URL includes:
client_id(application identifier) ORid_token_hint(id_token)post_logout_redirect_uri(pre-registered callback URL)state(random string to prevent CSRF attacks—see Authentication Security)
Example URL:
https://API_ENVIRONMENT/LOGOUT_ENDPOINT
?client_id=CLIENT_ID
&post_logout_redirect_uri=CALLBACK_URI
&state=XYZ
Notes:
API_ENVIRONMENTcould be something likedigital.garden-fi.comLOGOUT_ENDPOINTcould be something like/a/consumer/api/v0/oidc/logout
With these two examples, you would send the request to https://digital.garden-fi.com/a/consumer/api/v0/oidc/logout
3. User Prompted to Confirm Logout
The user is prompted to confirm that they intend to log out of the Authorization Server.
4. User Redirected to POST_LOGOUT_REDIRECT_URI
The user is redirected to the provided POST_LOGOUT_REDIRECT_URI. If no POST_LOGOUT_REDIRECT_URI is present, the Authorization Server will redirect the user to its own logout page.
- Have a how-to question? Seeing a weird error? Get help on StackOverflow.
- Register for the Developer Office Hours where we answer technical Q&A from the audience.