# How to migrate firebase authentication users to auth0 with same firebase password

**URL:** <https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628>\
**Category:** Get Help\
**Tags:** signup-prompt-new-experience, login-experience\
**Created:** [February 17, 2024, 9:25am UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628 "2024-02-17T09:25:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinezdk19](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dinezdk19/32/54908_2.png) [@dinezdk19](https://community.auth0.com/u/dinezdk19)\
**Post date:** [February 17, 2024, 9:25am UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/1 "2024-02-17T09:25:59Z")

</div>

I have export the users list from firebase and its returns hashed passwords. If obtaining the actual password is not feasible. i want migrate firebase authentication users to auth0 with same firebase password.  
sample data from firebase user  
{  
“localId”: “oWsCEO2GadXd2hOtDyst23tPKfk2”,  
“email”: “[xocah27868@aaorsi.com](mailto:xocah27868@aaorsi.com)”,  
“emailVerified”: false,  
“passwordHash”: “iVaYAy8qgtXZ/mvR2U/sXvwGnPP3YPxjw4lTgSrhuS2IbP9HThrfxjr4pFRfRkujjIZUgaHZ7WbRkKy2vulqcg==”,  
“salt”: “drRka5fZiekYNA==”,  
“displayName”: “Debi Prasad”,  
“photoUrl”: “xxxxx”,  
“lastSignedInAt”: “1687163285285”,  
“createdAt”: “”,  
“phoneNumber”: “”,  
“disabled”: false,  
“customAttributes”: “{"is2FACompleted":false}”,  
“providerUserInfo”:   
}

---

<div class="post-metadata">

**Author:** ![Latonyadodson](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Latonyadodson](https://community.auth0.com/u/Latonyadodson)\
**Post date:** [February 19, 2024, 9:42am UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/2 "2024-02-19T09:42:50Z")

</div>

> [@dinezdk19](#):
>
> I have export the users list from firebase and its returns hashed passwords. If obtaining the actual password is not feasible. i want migrate firebase authentication users to auth0 with same firebase password.  
> sample data from firebase user  
> {  
> “localId”: “oWsCEO2GadXd2hOtDyst23tPKfk2”,  
> “email”: “[xocah27868@aaorsi.com]([mailto:xocah27868@aaorsi.com](mailto:xocah27868@aaorsi.com)[Be Ball Players](https://www.beballplayers.com/))”,  
> “emailVerified”: false,  
> “passwordHash”: “iVaYAy8qgtXZ/mvR2U/sXvwGnPP3YPxjw4lTgSrhuS2IbP9HThrfxjr4pFRfRkujjIZUgaHZ7WbRkKy2vulqcg==”,  
> “salt”: “drRka5fZiekYNA==”,  
> “displayName”: “Debi Prasad”,  
> “photoUrl”: “xxxxx”,  
> “lastSignedInAt”: “1687163285285”,  
> “createdAt”: “”,  
> “phoneNumber”: “”,  
> “disabled”: false,  
> “customAttributes”: “{“is2FACompleted”:false}”,  
> “providerUserInfo”:  
> }

Hello,

Migrating firebase authentication users to auth0 with the same firebase password is a challenging task, because firebase uses a custom version of the scrypt hashing algorithm that is not compatible with the standard scrypt algorithm used by auth0. Therefore, you cannot directly import the password hashes from firebase to auth0.

However, there are some possible workarounds that you can try, depending on your situation and preferences:

If you have access to the original plain-text passwords of your users, you can use the Firebase Admin SDK to export them and then use the auth0 CLI or API to import them with the standard scrypt algorithm.

If you do not have access to the original plain-text passwords, but you have access to the internal parameters of the firebase scrypt algorithm (such as the base64\_signer\_key and the base64\_salt\_separator), you can use them to convert the firebase password hashes to the standard scrypt format and then import them to auth0.

If you do not have access to either the original plain-text passwords or the internal parameters of the firebase scrypt algorithm, you can use a hybrid approach where you create a custom database connection in auth0 that connects to your firebase database and verifies the user credentials using the firebase scrypt algorithm. Then, you can use the auth0 migration feature to gradually migrate your users to auth0 as they log in.

Alternatively, you can ask your users to reset their passwords and create new ones in auth0. This is the simplest option, but it may cause some inconvenience and friction for your users.

I hope this helps you find a suitable solution for your migration problem.

Best regards,  
Latonyadodson

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 19, 2024, 11:40am UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/4 "2024-02-19T11:40:56Z")

</div>

Hey there @dinezdk19 , welcome to the Auth0 Community!

To confirm, Auth0 doesn’t store plain user passwords.

Adding to what @Latonyadodson already shared, in case you have access to the Firebase internal algorithm details (like for example if the password has been first salt prefixed / postfixed), you should also be able to import users with a “`custom_password_hash`” property.

This [doc](https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples#custom-password-hash) shows what this property consists of and what’s supported by Auth0.

Later below, there are examples of user JASONs.

@Latonyadodson, we value your partnership!

Please let us know if there are any questions / error messages you get from importing your users to Auth0!

---

<div class="post-metadata">

**Author:** ![dinezdk19](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dinezdk19/32/54908_2.png) [@dinezdk19](https://community.auth0.com/u/dinezdk19)\
**Post date:** [February 19, 2024, 11:55am UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/5 "2024-02-19T11:55:58Z")

</div>

Hi @marcelina.barycka below obj for firebase auth hashed confg  
//The information below can be used to migrate password users.  
hash\_config {  
algorithm: SCRYPT,  
base64\_signer\_key:

Sg6N7Vr2u5lT4/tgXdmYQiLko9JlpRjmdiMTRlVN6gamEkvkvSODhamZufKOUfU5NheZBOzsxBr6VPfwwOzDcw==,  
base64\_salt\_separator: Bw==,  
rounds: 8,  
mem\_cost: 14,  
}

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 21, 2024, 12:28pm UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/6 "2024-02-21T12:28:11Z")

</div>

Hi @dinezdk19 ,

Looking at the hash config shared I can see that there is one unsupported for our custom\_password\_hash property: base64\_salt\_separator. Also you seem lack of the salt value itself.

You could try with the below JSON (and try make adjustments it that fail, but as mentioned above, I thing the hash config used in Firebase is not compatible wit ours):

```auto
{
#other user data,
"custom_password_hash": {
"algorithm": "scrypt",
"hash": {
"value": "value",
"encoding": "base64",
"key": {
"value": "key_value",
"encoding": "base64"}},
"salt": {
"value": "salt_value",
"encoding": "base64",
}}}

```

Please let us know if you were able to import your users with hashed passwords!  
In case it’s technically not possible, you can still import them without passwords (users will have to reset their passwords during the next login) or you can implement the [gradual user migration](https://auth0.com/docs/manage-users/user-migration/configure-automatic-migration-from-your-database).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 6, 2024, 12:28pm UTC](https://community.auth0.com/t/how-to-migrate-firebase-authentication-users-to-auth0-with-same-firebase-password/127628/7 "2024-03-06T12:28:21Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
