Skip to content

fix: add PKCE to Mystira OIDC login#157

Merged
JustAGhosT merged 1 commit into
mainfrom
agent/fix-mystira-pkce
Jul 18, 2026
Merged

fix: add PKCE to Mystira OIDC login#157
JustAGhosT merged 1 commit into
mainfrom
agent/fix-mystira-pkce

Conversation

@JustAGhosT

Copy link
Copy Markdown
Collaborator

Summary

  • generate a PKCE code verifier/challenge when starting Mystira Identity auth
  • include code_challenge and code_challenge_method=S256 on the authorize redirect
  • store the verifier in the short-lived OAuth state cookie and send code_verifier during token exchange

Validation

  • pnpm exec eslint app/api/auth/callback/[provider]/route.ts lib/auth/identity-provider.ts
  • pnpm run type-check
  • pnpm exec prettier --check app/api/auth/callback/[provider]/route.ts lib/auth/identity-provider.ts

Live issue fixed

Mystira Identity rejected the authorize request with invalid_request: mandatory code_challenge parameter missing.

@JustAGhosT
JustAGhosT merged commit 7e9ab39 into main Jul 18, 2026
7 checks passed
@JustAGhosT
JustAGhosT deleted the agent/fix-mystira-pkce branch July 18, 2026 20:53
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