Skip to content

feat(auth): sign in with the chapter clerk instance only - #110

Merged
renarin-kholin merged 4 commits into
masterfrom
feat/clerk-signin
Nov 28, 2026
Merged

renarin-kholin merged 4 commits into
masterfrom
feat/clerk-signin

Conversation

@renarin-kholin

@renarin-kholin renarin-kholin commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Sign in only through the chapter's Clerk instance (OpenID Connect with PKCE, via Authlib). The password form, sign up page and change password are removed; /signup goes to Clerk, where anyone can create an account
  • On sign in the verified email is matched to an existing users row (case insensitive) or a new member is created
  • is_admin is synced from Clerk on every sign in: Admins of the IDP_ORG organization are website admins (IDP_ADMIN_ROLES, default org:admin, or a permission via IDP_ADMIN_PERMISSION). If Clerk cannot be reached the current value is kept
  • A Create an account button opens Clerk's hosted sign-up page and returns to the site signed in (IDP_SIGNUP_URL, defaults to the Account Portal). The sign in button uses the white ACM logo
  • New settings are documented in .env.example: IDP_CLIENT_ID, IDP_CLIENT_SECRET, optional IDP_DISCOVERY_URL, and for roles CLERK_SECRET_KEY, IDP_ORG
  • No user migration: all existing passwords use a legacy hash that could no longer be verified, most usernames are not emails, and no account has competition history, so members sign up fresh

@renarin-kholin
renarin-kholin marked this pull request as draft November 28, 2026 10:30
@renarin-kholin
renarin-kholin marked this pull request as ready for review November 28, 2026 11:10
@renarin-kholin
renarin-kholin merged commit b1f5833 into master Nov 28, 2026
3 checks passed
@renarin-kholin
renarin-kholin deleted the feat/clerk-signin branch November 28, 2026 11:25
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.

1 participant