Hello experienced Firebase users,
I am new to firebase and I would need to generate a custom JWT token on server and get that distributed further down to clients which can log from Mobile (android, iOS) and web + need some custom email/password access.
I am unclear about some basic flows with firebase auth. If someone could point me to some good book, documentation etc that would be great.
- Lets consider scenario that user logs via Facebook provider from android mobile device.
User logins via client library to facbook, gets back Token Id and follows callback link to server where can get custom JWT which is returned to him. Is that flow correct?
How there can get custom entities about user which might be needed for generating JWT token? Is there expected that all be fetched back from firebase DB?
What if there is necessity to manage roles for users? Is there possible to add custom column to firebase auth "table" ? Or there needs to be a mapping table UID to custom data?
When I have custom provider (not FB, Twitter, ...) do I understand correctly that I need to mange password/user management on my own? What happens if user login next time via e.g. facebook? Will be there two user or are merged to one?
And finally, On server firebase client when using auth.createCustomToken where I can get the secret used for signature?
Thanks for clarification