• 0 Votes
    2 Posts
    473 Views
    F
    The /oauth2/logout endpoint only removes the SSO session (the front-channel session controlled by the "Keep Me Signed In" toggle). It does not automatically revoke the refresh token (also known as offline_access). To properly implement logout, you need to handle both sessions separately: Recommended Logout Flow User initiates logout in your application Your backend revokes the refresh token using the Revoke Refresh Tokens API:DELETE /api/jwt/refresh/{refreshTokenId} Or revoke by user and application:DELETE /api/jwt/refresh?userId={userId}&applicationId={applicationId} Destroy your local application session (clear tokens, cookies, etc.) Redirect to /oauth2/logout with id_token_hint to clear the SSO session Why This Approach? Revoking the refresh token from your application (step 2) is better than relying on the logout URL callback because: You have direct access to the user's session data You know exactly which refresh token to revoke You can handle errors gracefully The flow is more deterministic The /oauth2/logout endpoint can call a logout URL configured in your FusionAuth OAuth application settings, but handling revocation proactively in your app provides better control. Important Note About JWTs Since JWTs (access tokens) are stateless, they cannot be immediately revoked by FusionAuth. If you need to invalidate JWTs before their natural expiration, you'll need to implement your own revocation strategy, such as maintaining a token denylist in your application. Related Documentation OAuth Logout API - Details on the /oauth2/logout endpoint Revoke Refresh Tokens API - How to revoke refresh tokens programmatically Logout and Session Management - Comprehensive guide on logout strategies and session types Revoking JWTs - Strategies for JWT revocation JWT Refresh Token Revoke Event - Webhook event when refresh tokens are revoked
  • Logout with multiple subdomains

    Moved Unsolved Q&A logout domains
    6
    2
    0 Votes
    6 Posts
    5k Views
    B
    @mark-robustelli said in Logout with multiple subdomains: @ext_figuvini after reading your post again, I think I read it differently. The way the SSO logout works is that on logout, FusionAuth calls all the logout urls for each applications. It would seem that you are correct in that creating an application for each subdomain makes sense and would work. (You can create applications through the API so you should be able to automate this.) Can you try this for a few domains and confirm it works? Your point is correct. Creating a separate application for each subdomain is a reasonable and correct solution. When a user logs out of the SSO system, FusionAuth will call the logout URLs defined in each configured application in turn. This allows each application to clean up its own session. Pretty good solution
  • Identity provider logout

    Moved Solved Q&A logout
    4
    0 Votes
    4 Posts
    5k Views
    danD
    @quent I understand your position, and we appreciate the feedback. Can you please create a github issue linking to this forum post and with as much detail as you can provide (including, perhaps, sample logout urls provided by IdPs you are interested in)? https://github.com/fusionauth/fusionauth-issues/issues
  • Apple Sign in Provider , Logout

    General Discussion logout
    2
    0 Votes
    2 Posts
    3k Views
    joshuaJ
    @syed-muneeb Can you provide a bit more context about what you are trying to accomplish, the errors you are seeing, and other procedural steps? This may enable us to better assist. Thanks, Josh FusionAuth
  • Clarification on OAuth/OIDC logout endpoint

    Moved Q&A oauth oidc logout
    4
    0 Votes
    4 Posts
    8k Views
    M
    Yea, that flexibility would be ideal IMO, although the registeredLogoutURLs should be workable for us at this point. FWIW that is actually the behavior I assumed before digging into the docs. I'll definitely add the issue to GitHub, as I think it's probably part of the path to getting OIDC Certification which appears to already have an issue. Thanks!
  • logout questions

    Moved Q&A logout
    6
    0 Votes
    6 Posts
    11k Views
    B
    @dan said in logout questions: 've got a question about logout. When logging in using the /oauth2/token route with the auth wordle code grant, it seems the /api/logout route does not revoke the refresh token. Is intended? Is the best way to log out in this case is with the /ouath2/logout route? How does that know which user to log out? there's no user id or refresh token property in the body. Regarding user identification during logout, the OAuth 2.0 specification doesn't define a standard logout endpoint. Logout processes are often application-specific, and the mechanism to identify the user being logged out might depend on the authentication framework or technology being used.
  • 0 Votes
    2 Posts
    8k Views
    danD
    You can use the post_logout_redirect_uri query parameter on the logout endpoint to configure where a user ends up after logout. More here: https://fusionauth.io/docs/v1/tech/oauth/endpoints