rotolonico / firebase-auth-with-google-rest-api Goto Github PK
View Code? Open in Web Editor NEWAn example of a implementation with REST APIs of Firebase Authentication with Google provider (based around this tutorial: https://youtu.be/AWp9RdxTJco)
An example of a implementation with REST APIs of Firebase Authentication with Google provider (based around this tutorial: https://youtu.be/AWp9RdxTJco)
it says "Success, you can return to the app now!" but this pops up
but the part in
var payLoad =
$"{{\"postBody\":\"id_token={token}&providerId={providerId}\",\"requestUri\":\"http://localhost\",\"returnIdpCredential\":true,\"returnSecureToken\":true}}";
RestClient.Post($"https://identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key={ApiKey}", payLoad).Then(
response =>
{
// You now have the userId (localId) and the idToken of the user!
Debug.Log(response.Text);
}).Catch(Debug.Log);
}
RequestException: HTTP/1.1 403 Forbidden
UnityEngine.Debug:LogError (object)
FirebaseAuthHandler/<>c:<SingInWithToken>b__1_1 (System.Exception) (at Assets/Scripts/FirebaseAuthHandler.cs:27)
RSG.Promise/<>c__DisplayClass44_0:<Catch>b__1 (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise_NonGeneric.cs:660)
RSG.Promise:InvokeRejectHandler (System.Action`1<System.Exception>,RSG.IRejectable,System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise_NonGeneric.cs:437)
RSG.Promise/<>c__DisplayClass34_0:<InvokeRejectHandlers>b__0 (RSG.RejectHandler) (at Assets/RestClient/Packages/RSG.Promise/Promise_NonGeneric.cs:500)
RSG.Promises.EnumerableExt:Each<RSG.RejectHandler> (System.Collections.Generic.IEnumerable`1<RSG.RejectHandler>,System.Action`1<RSG.RejectHandler>) (at Assets/RestClient/Packages/RSG.Promise/EnumerableExt.cs:15)
RSG.Promise:InvokeRejectHandlers (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise_NonGeneric.cs:500)
RSG.Promise:Reject (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise_NonGeneric.cs:554)
RSG.Promise`1/<>c__DisplayClass44_0<Proyecto26.ResponseHelper>:<Then>b__1 (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise.cs:767)
RSG.Promise`1<Proyecto26.ResponseHelper>:InvokeHandler<System.Exception> (System.Action`1<System.Exception>,RSG.IRejectable,System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise.cs:353)
RSG.Promise`1/<>c__DisplayClass24_0<Proyecto26.ResponseHelper>:<InvokeRejectHandlers>b__0 (RSG.RejectHandler) (at Assets/RestClient/Packages/RSG.Promise/Promise.cs:381)
RSG.Promises.EnumerableExt:Each<RSG.RejectHandler> (System.Collections.Generic.IEnumerable`1<RSG.RejectHandler>,System.Action`1<RSG.RejectHandler>) (at Assets/RestClient/Packages/RSG.Promise/EnumerableExt.cs:15)
RSG.Promise`1<Proyecto26.ResponseHelper>:InvokeRejectHandlers (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise.cs:381)
RSG.Promise`1<Proyecto26.ResponseHelper>:Reject (System.Exception) (at Assets/RestClient/Packages/RSG.Promise/Promise.cs:437)
Proyecto26.RestClient:Promisify<Proyecto26.ResponseHelper> (RSG.Promise`1<Proyecto26.ResponseHelper>,Proyecto26.RequestException,Proyecto26.ResponseHelper) (at Assets/RestClient/Packages/Proyecto26.RestClient/RestClientPromise.cs:341)
Proyecto26.HttpBase/<CreateRequestAndRetry>d__0:MoveNext () (at Assets/RestClient/Packages/Proyecto26.RestClient/Helpers/HttpBase.cs:40)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
Project need to be cleaned from unnecessary directories.
Consider downloading a gitignore from here: https://www.gitignore.io/api/unity.
README.md needs to be update with minimal project information.
Thanks for the Interesting tutorial!
I have a question for you. Is there a way to make auto Google-sign-in ? In similar applications they do it without user copy and paste some code.
I tried the both methods but while playing in editor and pressing the sing in with google button it redirect me to browser and asking which id to sign in also on selecting one successfully signing in but if i go back to the editor in debug it prints this exception plz help me buddy.
Proyecto26.RequestException: HTTP/1.1 400 Bad Request
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.