-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Firebase Auth #222
Closed
Closed
Adding Firebase Auth #222
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samhill303
reviewed
Mar 29, 2024
shared/src/commonMain/kotlin/co/touchlab/droidcon/domain/service/AuthenticationService.kt
Outdated
Show resolved
Hide resolved
samhill303
reviewed
Mar 29, 2024
minSdk = libs.versions.minSdk.get().toInt() | ||
targetSdk = libs.versions.targetSdk.get().toInt() | ||
versionCode = 20201 | ||
versionName = "2.2.0" | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
val clientId = properties.getProperty("clientId", "") | ||
buildConfigField("String", "CLIENT_ID", clientId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the readme with instructions on how to set your clientID for both android and iOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the readme
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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