garyburgmann / drf-firebase-auth

Firebase backend to receive a user idToken and authenticate via Django REST Framework 'authentication.BaseAuthentication'. Optionally, a new local user can be created in the process.
MIT License
128 stars 62 forks source link

What is the thing with map_firebase_uid_to_username for the key 'FIREBASE_USERNAME_MAPPING_FUNC' #42

Open venqics opened 2 years ago

venqics commented 2 years ago

When i try to migrate following as per the instructions, the map_firebase_uid_to_username is undefined variable. How to resolve this?

samirsd commented 2 years ago

agreed, this is poorly explained

tarikozket commented 1 year ago

it's optional, from the documentation:

You can get away with leaving all the settings as default except for FIREBASE_SERVICE_ACCOUNT_KEY, which is obviously required.

it's basically the mapper function for the username field's value which is used while creating users.

you only set it if you would like to have a custom mapper. simply drop it if you don't need a custom mapper.