-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Post logout redirect URL #192
Conversation
WalkthroughThe recent changes to the logout functionality streamline the process of determining the post-logout redirect URL. By directly using the router client’s search parameters instead of relying on the session manager, the implementation reduces unnecessary complexity. This enhances clarity and efficiency by integrating the redirect logic into the logout process, resulting in a more straightforward flow for users. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RouterClient
participant AuthService
User->>RouterClient: Initiate Logout
RouterClient->>AuthService: Retrieve postLogoutRedirectURL
alt URL is valid
AuthService->>RouterClient: Redirect to specified URL
else URL is invalid
AuthService->>RouterClient: Redirect to default URL
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/handlers/logout.js (2 hunks)
Additional comments not posted (3)
src/handlers/logout.js (3)
1-2
: Good practice: Explicit imports.The import statements are clear and explicit, which is a good practice for maintainability.
13-13
: Ensure the default redirect URL is configured.The
postLogoutRedirectURL
is set to either the search parameter or a default value from the config. Ensure thatconfig.postLogoutRedirectURL
is properly configured to avoid potential issues.
18-18
: LGTM! Ensure proper URL encoding.The
authUrl.searchParams.set
method is used to set the redirect URL. Ensure that the URL is properly encoded to avoid any issues with special characters.
fix: Post logout redirect URL
Explain your changes
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.