Skip to content
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

Add ability to link user account with existing account #35

Merged

Conversation

jordond
Copy link
Contributor

@jordond jordond commented Jul 11, 2024

This PR allows Firebase accounts to be linked. The feature is toggleable because Apple requires getting explicit permission when linking Apple accounts to other accounts.

@mirzemehdi mirzemehdi self-requested a review July 11, 2024 20:12
r4m-mirze

This comment was marked as outdated.

Copy link
Owner

@mirzemehdi mirzemehdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this amazing PR @jordond. All looks good. But looks like feature is incompleted. Currently, it supports only linking apple sign-in, but for github and google sign in linking is not supported. Can you please also add support for that?

@mirzemehdi mirzemehdi force-pushed the feature/link-existing-user branch from dd8850d to 34de2a4 Compare October 6, 2024 10:23
@mirzemehdi mirzemehdi changed the base branch from main to rel_v2.1.0 October 6, 2024 10:24
@mirzemehdi mirzemehdi merged commit e29b9cd into mirzemehdi:rel_v2.1.0 Oct 6, 2024
Copy link
Owner

@mirzemehdi mirzemehdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jordond for initiating this amazing PR.

Now, all of sign in ui containers have optional linkAccount field. By default it is false as before

//Google Sign-In Button and authentication with Firebase
GoogleButtonUiContainerFirebase(onResult = onFirebaseResult, linkAccount = false) {
    GoogleSignInButton(modifier = Modifier.fillMaxWidth().height(44.dp), fontSize = 19.sp) { this.onClick() }
}

//Apple Sign-In Button and authentication with Firebase
AppleButtonUiContainer(onResult = onFirebaseResult, linkAccount = false) {
    AppleSignInButton(modifier = Modifier.fillMaxWidth().height(44.dp)) { this.onClick() }
}
        
//Github Sign-In and authentication with Firebase
GithubButtonUiContainer(onResult = onFirebaseResult, linkAccount = false) {
    Button(onClick = { this.onClick() }) { Text("Sign In with Github") }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants