-
Notifications
You must be signed in to change notification settings - Fork 21
Google Sign in
Mk5 edited this page Mar 13, 2021
·
12 revisions
Google authorization has few additional steps to done.
- Add google auth library to gradle dependencies
compile 'com.google.android.gms:play-services-auth:16.0.0'
- Add your sha1 fingerprint to firebase console.
./gradlew signingReport
will show you your current fingerprints. More info here.
- Add Firebase Google Auth frameworks
- Add custom URL schemes into your
Info.plist.xml
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>{YOUR_REVERSE_CLIENT_ID_FROM_GOOGLE_SERVICE_PLIST}</string>
<key>CFBundleURLSchemes</key>
<array>
<string>{YOUR_REVERSE_CLIENT_ID_FROM_GOOGLE_SERVICE_PLIST}</string>
</array>
</dict>
</array>
The original tutorial for that is here: https://firebase.google.com/docs/auth/ios/google-signin (pt 2.1)
The web platform is quite different so you can use some special configuration if you need it.
// Use this if your app should always show up the google accounts list
GdxFIRAuthHtml.setGoogleAuthAlwaysPromptForAccount(true);
// Use this if you prefer popup authorization - it is default behaviour
GdxFIRAuthHtml.setGoogleAuthViaPopup(true);
// Use this if you prefer redirect authorization
GdxFIRAuthHtml.setGoogleAuthViaRedirect(true);
GdxFIRAuth.inst().google().signIn().then(new Consumer() {
@Override
public void accept(GdxFirebaseUser gdxFirebaseUser) {
}
});
GdxFIRAuth.inst().google().signOut();
- Getting started
-
Usage 2.x/3.x
- Promises
- Filtering API
- Google Sign in
- Apple Sign in
- Mock other platforms
- Debug
- Database POJO Conversion
-
Examples
- Anonymous authentication
- Create user
- Sign in / Sign out
- Google sign in
- User management
- Upload image to storage
- Download image from storage
- Upload bytes to storage
- Download bytes from storage
- Delete something from storage
- Analytics API methods
- Crash API methods
- Database read value
- Database read object
- Database set value
- Database limit equal
- Database reference listener
- Database read objects list
- Database child event
- Database transaction
- Database sharding
- Database onDisconnect
- General examples
- Kotlin
- Usage 1.x
- Donate