Firebase user.updateProfile({…}) not working in React App

后端 未结 2 1401
北恋
北恋 2021-01-20 01:56

So, I have this ReactJS app, there is a user database,

The function for creating the user is this

import { ref, firebaseAuth } from \'./../Componen         


        
2条回答
  •  后悔当初
    2021-01-20 02:17

    Firebase Auth updateProfile only supports displayName and photoURL. It does not support client custom attributes. For admin custom attributes, you would need to use the admin SDK: https://firebase.google.com/docs/auth/admin/custom-claims#set_and_validate_custom_user_claims_via_the_admin_sdk

    You are probably better off in this case saving these arbitrary custom fields in the database only (provided they do not require admin privileges).

提交回复
热议问题