Skip to content

Feature/sign up page - #47

Merged
dcl10 merged 3 commits into
mainfrom
feature/sign-up-page
May 20, 2026
Merged

Feature/sign up page#47
dcl10 merged 3 commits into
mainfrom
feature/sign-up-page

Conversation

@dcl10

@dcl10 dcl10 commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Implements sign-up and sign-out for the Matchboard application.

Sign-up (/sign-up placeholder removed): Sign up buttons in the TopBar and hero CTA now use a server action that passes prompt=create to 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_hint to Keycloak's end-session endpoint (/protocol/openid-connect/logout) so the SSO session is properly terminated.

Linked issues

(Optional) Screenshots

dcl10 and others added 3 commits May 20, 2026 11:21
…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>
@dcl10
dcl10 merged commit 6a96190 into main May 20, 2026
1 check passed
@dcl10
dcl10 deleted the feature/sign-up-page branch May 20, 2026 10:51
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.

Sign Up Page

1 participant