In Firebase, the password hash is stored in passwordHash and is hashed using SCRYPT with specific parameters. In Supabase, the password is stored in encrypted_password and is hashed using bcrypt. As a result, when migrating authenticated users, an error occurs due to the different password hashing algorithms. #1750
Labels
bug
Something isn't working
Bug report
The difference between the newly created Supabase user and the migrated Firebase user is primarily in the password handling. Here’s a breakdown of the issues and potential reasons for the "invalid_grant" error:
Password Storage and Hashing Differences
Supabase User (newsupabase1@yopmail.com):
The password is stored in encrypted_password and is hashed using bcrypt ($2a$10$d31Fd//DLU.28P2H3.ywpOqkfrBODA74IlmuNtU3LbJPm/1hhYGhy).
This indicates that the password is correctly hashed and stored by Supabase's default bcrypt implementation.
Migrated Firebase User (newusersexperienced@yopmail.com):
The password hash is stored in passwordHash and uses SCRYPT with specific parameters.
This user’s encrypted_password is empty, and the passwordHash field contains the SCRYPT-based hash.
hash_parameters include details like rounds, mem_cost, algorithm, and base64 encoding, which indicates SCRYPT was used for hashing.
Due to this issue, we are unable to authenticate Firebase users in Supabase. As discussed, you mentioned that this is a bug and that you will soon update the password hashing in Supabase.
The text was updated successfully, but these errors were encountered: