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
feat(authentication): add Sign-In Anonymously #176
Conversation
@robingenz What's the idea behind Did you think something like this, similar to the
|
@trancee This would be my first attempt: public async linkWithGoogle(): Promise<SignInResult> {
const auth = getAuth();
if (!auth.currentUser) {
throw new Error(FirebaseAuthenticationWeb.ERROR_NO_USER_SIGNED_IN);
}
const provider = new GoogleAuthProvider();
const userCredential = await linkWithPopup(auth.currentUser, provider)
const authCredential = GoogleAuthProvider.credentialFromResult(userCredential);
return this.createSignInResult(userCredential, authCredential);
} The user is not provided. The operation always affects the current user. |
@robingenz There are 3 ways to linking:
We are mainly using By the way: I have added |
No, we currently only support popups.
👍
👍
Good idea! But i suggest to call it |
I had name it the same way Google already named it in their docs: However, they also seem to mix it between And I just noticed they also have this for Should we do the same, or keep it as |
Oh, looks like there is no wrong or right. 😅 I leave it up to you. We can keep it that way for now if you want. |
I have added the |
To be honest, I don't like that approach for 3 reasons:
|
Thanks for sharing your opinion on this. I guess there are always pros/cons and I understand your point. I will keep single methods for each provider. |
If the definitions are fine with you, I will start with the implementation. |
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.
LGTM. You can start with the implementation.
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.
Thank you! I will review again these days. I just had little time.
...n/java/io/capawesome/capacitorjs/plugins/firebase/authentication/FirebaseAuthentication.java
Outdated
Show resolved
Hide resolved
...n/java/io/capawesome/capacitorjs/plugins/firebase/authentication/FirebaseAuthentication.java
Outdated
Show resolved
Hide resolved
@trancee Sorry this whole process is taking so long because of me. I'm unfortunately sick at the moment and rarely online. I will review as soon as possible. |
No worries. Take your time to recover, this can wait. |
@trancee I made a few changes on your branch. I hope that was ok. Otherwise we can revert it. I want to get the next release out in a timely manner and had a few more comments. |
|
I had to revert one change where there is a special circumstance. When you link an account, there are ways to use a directly linking method like I also had to add the providerID for By the way, I was not able to test Google Play Games as I am not able to set it up properly on my side. |
@trancee Looks great! Thank you so much for your work! |
@trancee Can we remove the |
Yes, I will remove this since it is not being used anywhere. |
@trancee Great! Thank you so much! I will merge this today. |
Co-authored-by: Robin Genz <mail@robingenz.dev>
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset
).Close #35