Bewust niet refactored om de stappen onder elkaar te laten zien op de plek van actie
google-services.json
in app folder- permissie internet in
AndroidManifest.xml
op root-niveau
<uses-permission android:name="android.permission.INTERNET" />
- FirebaseAuth
- .getInstance()
- signInWithCredential()
- AuthResult
- .signOut()
- FirebaseUser
LoginActivity navigeert na login naar MainActivity:Homefragment en laat Firebase User naam zien Op HomeFragment een loguit-knop die na uitloggen/disconnect van Google naar LoginActivity navigeert
- GoogleSignInClient
- .signInIntent
- GoogleSignInOptions
- .Builder
- GoogleSignIn
- .getSignedInAccountFromIntent(data) // haalt uit Intent van GoogleSignIn activity result een GoogleSignInAccount
- GoogleSignInAccount
- idToken om met GoogleAuthProvider.getCredential(...) AuthCredential om te halen
- GoogleAuthProvider
- .getCredential
- AuthCredential wordt gebruikt door FirebaseAuth om in te loggen
FirebaseUI