Migrate auth from Mukoko OAuth/PKCE to direct Stytch Consumer SDK - #9
Merged
Merged
Conversation
Replace the Connected App OAuth flow through id.mukoko.com with direct Stytch Consumer SDK integration. Users now authenticate on nhimbe.com using email magic links or OTP instead of being redirected externally. Frontend changes: - Add StytchProvider wrapping the app with Stytch's SDK context - Replace AuthContext to use Stytch hooks (useStytchUser, useStytchSession) instead of custom cookie/localStorage token management - Replace signin page with Stytch's pre-built StytchLogin UI component - Add /authenticate page for magic link token exchange - Add Stytch CSS overrides matching nhimbe brand colors - Delete OAuth route handlers (login, callback) and callback page Backend changes: - Replace OAuth token validation with Stytch session JWT validation via POST /v1/sessions/authenticate - Replace /api/auth/token (OAuth code exchange) with /api/auth/sync (session-based user lookup/creation) - Remove exchangeCodeForTokens and getUserInfo OAuth helpers - Add revokeSession helper for server-side session revocation https://claude.ai/code/session_01Ad3GsnUhMePaDM1eL6GhyP
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
mukoko-nhimbe-api | 4c0e8dd | Commit Preview URL Branch Preview URL |
Feb 13 2026, 04:28 AM |
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.
Replace the Connected App OAuth flow through id.mukoko.com with direct
Stytch Consumer SDK integration. Users now authenticate on nhimbe.com
using email magic links or OTP instead of being redirected externally.
Frontend changes:
instead of custom cookie/localStorage token management
Backend changes:
via POST /v1/sessions/authenticate
(session-based user lookup/creation)
https://claude.ai/code/session_01Ad3GsnUhMePaDM1eL6GhyP