File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,20 @@ public async Task<FirebaseAuthLink> SignInWithOAuthAsync(FirebaseAuthType authTy
89
89
return await this . ExecuteWithPostContentAsync ( GoogleIdentityUrl , content ) . ConfigureAwait ( false ) ;
90
90
}
91
91
92
+ /// <summary>
93
+ /// Using the provided Id token from google signin, get the firebase auth with token and basic user credentials.
94
+ /// </summary>
95
+ /// <param name="authType"> The auth type. </param>
96
+ /// <param name="idToken"> The Id token retrieved from google signin </param>
97
+ /// <returns> The <see cref="FirebaseAuth"/>. </returns>
98
+ public async Task < FirebaseAuthLink > SignInWithGoogleIdTokenAsync ( string idToken )
99
+ {
100
+ var providerId = this . GetProviderId ( FirebaseAuthType . Google ) ;
101
+ var content = $ "{{\" postBody\" :\" id_token={ idToken } &providerId={ providerId } \" ,\" requestUri\" :\" http://localhost\" ,\" returnSecureToken\" :true}}";
102
+
103
+ return await this . ExecuteWithPostContentAsync ( GoogleIdentityUrl , content ) . ConfigureAwait ( false ) ;
104
+ }
105
+
92
106
/// <summary>
93
107
/// Sign in user anonymously. He would still have a user id and access token generated, but name and other personal user properties will be null.
94
108
/// </summary>
You can’t perform that action at this time.
0 commit comments