Skip to content

Fix issue with using custom scheme with BackchannelLogout#185

Merged
kailash-b merged 2 commits into
mainfrom
bug/SDK-7064
Oct 30, 2025
Merged

Fix issue with using custom scheme with BackchannelLogout#185
kailash-b merged 2 commits into
mainfrom
bug/SDK-7064

Conversation

@kailash-b
Copy link
Copy Markdown
Contributor

@kailash-b kailash-b commented Oct 30, 2025

Description

This PR fixes an issue where the Backchannel Logout feature did not properly support custom authentication schemes. Previously, the BackchannelLogoutHandler was hardcoded to use the default Auth0Constants.AuthenticationScheme, which caused failures when developers configured Auth0 authentication with a custom scheme name.

Changes made:

  1. Modified BackchannelLogoutHandler to accept an authentication scheme parameter:

    • Added a new constructor overload that accepts both ILogoutTokenHandler and authenticationScheme
    • The existing parameterless constructor now delegates to the new constructor with the default scheme for backward compatibility
    • Updated the handler to use the provided scheme when retrieving Auth0WebAppOptions and OpenIdConnectOptions
  2. Updated Auth0WebAppAuthenticationBuilder.WithBackchannelLogout():

    • Modified service registration to inject the configured authentication scheme into BackchannelLogoutHandler
    • This ensures the handler uses the same scheme as the rest of the authentication flow
  3. Added integration test to verify custom scheme support:

    • New test Should_Support_Custom_Authentication_Scheme validates that backchannel logout works correctly with custom schemes
    • Test creates a server with a custom scheme and verifies successful logout token processing
  4. Updated documentation in EXAMPLES.md:

    • Added guidance for developers using custom schemes to ensure consistency across login, logout, and backchannel logout configuration
  5. Dependency update:

    • Downgraded FluentAssertions from v8.5.0 to v7.2.0 for compatibility

References

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main
  • All the commits are signed.

@kailash-b kailash-b requested a review from a team as a code owner October 30, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants