Bug report
Describe the bug
Only OTP supports PKCE, but not magic link, opening us up to a host of vulnerabilities: phishing, account takeovers via emails, etc.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Just read this line:
|
flowType := models.ImplicitFlow |
|
var authenticationMethod models.AuthenticationMethod |
|
if strings.HasPrefix(params.Token, PKCEPrefix) { |
|
flowType = models.PKCEFlow |
PKCE flow is triggered only for the token param, and not token_hash.
Expected behavior
PKCE enabled for magic link flows.
Docs imply that PKCE is enabled for magic link emails, but that's not the case:
Also here: https://supabase.com/features/passwordless-login-via-magicklink
Bug report
Describe the bug
Only OTP supports PKCE, but not magic link, opening us up to a host of vulnerabilities: phishing, account takeovers via emails, etc.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Just read this line:
auth/internal/api/verify.go
Lines 135 to 138 in cda62a9
PKCE flow is triggered only for the
tokenparam, and nottoken_hash.Expected behavior
PKCE enabled for magic link flows.
Docs imply that PKCE is enabled for magic link emails, but that's not the case:
Also here: https://supabase.com/features/passwordless-login-via-magicklink