Feature/sign up page - #47
Merged
Merged
Conversation
…ceholder Adds signUpWithKeycloak server action which passes prompt=create to the Keycloak authorisation URL, directing users to Keycloak's hosted registration form. Sign up buttons in the TopBar and hero CTA are updated to use this action via native form submission, consistent with the sign-in pattern. The /sign-up placeholder page is removed. Closes #44 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
next-auth's signOut only cleared the local JWT cookie, leaving Keycloak's SSO session intact. Signing back in would silently re-authenticate the same user without prompting for credentials. Store the ID token in the JWT and session on initial sign-in, then use it as id_token_hint when redirecting to Keycloak's end-session endpoint so the Keycloak session is properly terminated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements sign-up and sign-out for the Matchboard application.
Sign-up (
/sign-upplaceholder removed): Sign up buttons in the TopBar and hero CTA now use a server action that passesprompt=createto Keycloak's authorisation URL, directing users straight to Keycloak's hosted registration form. This follows the same server action + native form pattern established for sign-in, avoiding Next.js router state corruption on back navigation.Sign-out: Adds a sign-out button to the dashboard placeholder. Fixes a bug where signing out only cleared the local next-auth session but left the Keycloak SSO session alive — meaning the user would be silently re-authenticated on the next sign-in attempt. The fix stores the ID token in the JWT on initial sign-in, then passes it as
id_token_hintto Keycloak's end-session endpoint (/protocol/openid-connect/logout) so the SSO session is properly terminated.Linked issues
(Optional) Screenshots