Adds a Login/Logout button in the settings screen, that will authenticate with google sign-in using Firebase. Then the user state is sent to the common code, to be used later.
Shared Code
Adding UserContext and UserData for commonly saved user information
Currently passing this information to the UserIdProvider for now, will be handled later
Adding abstract AuthenticationService for calling for sign in / sign out from common ui to platform specific code
Passing AuthenticationService into SettingsViewModel and using that for compose calls
Platform Code
Adding new Id "co.touchlab.droidconauthtest" for testing
Adding FirebaseAuth to android and iOS using Gradle and CocoaPods
Adding FirebaseService which is implementation of AuthenticationService for each platform, to handle authentication
Adding authentication listener in MainActivity and AppDelegate to save changes to the common code
Adding the ClientID as a secret in Android. Not sure if this is needed
TODO
We are unsure about saving the clientID in public or as a secret. In android it is already a secret, however in iOS it's added in a URLScheme so it's more challenging to keep secret. Will look into this more.
Proof
Note for Android emulator you'll need to be signed into your emulator
Adding support for Firebase Authentication
Adds a Login/Logout button in the settings screen, that will authenticate with google sign-in using Firebase. Then the user state is sent to the common code, to be used later.
Shared Code
UserContext
andUserData
for commonly saved user informationUserIdProvider
for now, will be handled laterAuthenticationService
for calling for sign in / sign out from common ui to platform specific codeAuthenticationService
intoSettingsViewModel
and using that for compose callsPlatform Code
FirebaseAuth
to android and iOS using Gradle and CocoaPodsFirebaseService
which is implementation ofAuthenticationService
for each platform, to handle authenticationMainActivity
andAppDelegate
to save changes to the common codesecret
in Android. Not sure if this is neededTODO
We are unsure about saving the clientID in public or as a secret. In android it is already a secret, however in iOS it's added in a URLScheme so it's more challenging to keep secret. Will look into this more.
Proof