firebase / firebase-admin-dotnet

Firebase Admin .NET SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
367 stars 131 forks source link

CreateUserAsync doesn't return the idToken & refreshToken. Am I missing something? #159

Closed atresnjo closed 4 years ago

atresnjo commented 4 years ago

Sign up with email / password

But the REST API returns it. For now, to get the tokens I am just logging on automatically after the registration is done. Is this expected behavior? Thanks! :)

hiranya911 commented 4 years ago

Yes, this is the expected behavior. Admin SDK does not support user authentication operations (sign in or sign up). The CreateUserAsync() API in this library is meant to create user accounts from an administrative or other backend environment, without a direct involvement of the user. The REST API we use for this purpose (POST /account) allows creating user accounts without any parameters, and does not send back ID token since that doesn't make sense in this context.