New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get idToken and what to put in webClientId? #263
Comments
Hey, I will try to explain my solution because I was in similar situation minutes ago and I just solved it. In your login component you should setup Here you should have only this line, if you use offlineAccess: true, the idToken would be null, reference #223 The next thing is Sign in and create object with credential info for react-native-firebase In console.log(user) you should have now idToken and you can apply it in credentials and log in successfully. |
@evgeni-tsn Thank you for replying!! I just want to know now that what link or id am I supposed to give in the configure if I want to login or register with google?? |
@evgeni-tsn Do you have to put the client id for the iOS? |
I'm not sure but I think you should. I develop my app only for Android, but you can try. |
@evgeni-tsn u saved me man!! |
We added a guide for getting the configuration file. |
@AndreiCalazans is the webClientId mentioned by @evgeni-tsn the same one for iOS?
The docs say to get the webCleintId from https://console.developers.google.com/, but one I generated there and added as a param gave an error on iOS (projects don't match). It seems to be working for me in iOS (and Android), but I haven't tested it in production yet. If this is the correct way to get the |
You can check on StackOverflow with the following link. I posted in detail with code. |
for anybody experiencing issues with malformed credentials from evgenitsn code: //let credential = {token:user.idToken, secret:user.serverAuthCode, provider:'google', providerId: 'google'}
|
@evgenitsn evgenitsn. Thanks a lot.I have spent a lot time to find the web client Id |
Working in correct manner when running in debug mode but app is crashing in production @tkoolhoven |
Hello, I'm trying to authenticate with firebase auth using react-native-firebase library but seems like there are lots of issues coming in, I have not initialized webClientId or defined it and what I'm doing right now is that I'm currently sending my accessToken like this:
and here is my authentication firebase code:
Upon running, it throws me this error:
> User signin error Error: An internal error has occurred. [ Unable to parse Google id_token: -accessToken-
And then I did some research on how I can fix this and turns out that some articles said that I need idToken which I do not know how to get, I have not initialized my webClientId yet so that is the reason I think I'm currently getting null at, I do not know how to set that up so I tried to edit my config method like this which did not give me any tokenId:
so after all these attempts and seaching up the whole github I was not able to find any solution so this is the last thing but I since there are 74 issues which are open I don't think that this will be solved here so easily but please if you know the solution to this please answer. Thank you!
The text was updated successfully, but these errors were encountered: