Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Password Reset Flow not working as documented #349

@djemrose

Description

@djemrose

Bug report

Describe the bug

As heavily discussed there is a bug that logs the user in when they go to reset their password: supabase/supabase#3360

The onAuthStateChange shows this happening by firing the SIGNED IN event before the PASSWORD_RECOVERY event. I would imagine this is undesirable for everyone. This also causes the hash-bang url to get cleared in the browser immediately on page load, which prevents some apps from grabbing the documented access_token for later use.

To Reproduce

  1. Follow the official guide here whilst listening to the onAuthStateChange event: https://supabase.com/docs/reference/javascript/auth-api-resetpasswordforemail
  2. Also witness the hash-bang url being cleared on page load.

Expected behavior

  1. The hashbang url to not be cleared
  2. Only the PASSWORD_RECOVERY event to fire.
  3. No SIGNED_IN event should fire on page load.

Screenshots

Screen Shot 2022-02-10 at 8 56 21 pm

System information

  • OS: macOS
  • Browser Chrome
  • Version of supabase-js: @supabase/supabase-js 1.1.2
  • Version of Node.js: v16.13.1

Metadata

Metadata

Assignees

Labels

authbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions