Zak
Zak

Reputation: 137

Migrating Firebase project from custom auth, claims to native

I have an existing Firebase project where I'm managing auth myself in a backend API. I'm hashing the password and comparing it to a stored hashed password and returning a custom claims token.

I'm trying to transition the project to using the native auth (sign in with email + password). My problem is the existing users. I have hashed passwords for all of them stored in Firebase, but the Firebase auth itself doesn't know about the passwords. I don't want to force my users to all set their passwords again, but I don't see another way to accomplish this. Is there another way?

Upvotes: 0

Views: 111

Answers (1)

Renaud Tarnec
Renaud Tarnec

Reputation: 83163

I guess you know the key used to hash the passwords, since you stored them in Firestore. You could then use the auth:import command of the CLI.

Upvotes: 1

Related Questions