- Notifications
You must be signed in to change notification settings - Fork 542
Open
Labels
enhancementNew feature or requestNew feature or requesthas workaroundIssue has a valid workaround.Issue has a valid workaround.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
I was trying to work on a more detailed workflow when recovering the password, and when I was taking a look at the source code, I've found a possible bug
When the recovery token is recorded into the storage, the key stored is sb-api-auth-token-code-verifier but when the code tries to exchangeCodeForSession at line 545, ${this.storageKey}-code-verifier.
this.storageKey is a constant set into the constants.ts named STORAGE_KEY and its value is supabase.auth.token
Due to this, when exchangeCodeForSession is executed, since it doesn't find the code-verifier, I receive this error:
AuthApiError: invalid request: both auth code and code verifier should be non-empty To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Send a email password reset link
- Check the storage key created
- Click on the reset link
- When redirect to your site with the code query string try to execute
exchangeCodeForSessionwith this value - See the error on console
Expected behavior
Recover the session to reset the password properly
System information
- OS: macOS
- Browser (if applies) chrome
- Version of supabase-js: 2.39.3
- Version of @nuxtjs/supabase: 1.1.5
- Version of VueJs: 3.3.8
- Version of Node.js: 18.16.0
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthas workaroundIssue has a valid workaround.Issue has a valid workaround.