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

feat: support for loginWithRedirect() #224

Closed
lincolnthree opened this issue Oct 24, 2022 · 2 comments · Fixed by #238
Closed

feat: support for loginWithRedirect() #224

lincolnthree opened this issue Oct 24, 2022 · 2 comments · Fixed by #238

Comments

@lincolnthree
Copy link

lincolnthree commented Oct 24, 2022

Is your feature request related to a problem? Please describe:

Requesting support for loginWithRedirect() instead of PopUp, for web environments where we know pop-ups won't work and should not be attempted. Like electron, or other single-page platforms.

Describe the solution you'd like:

The CapacitorFirebase login/connect/etc APIs should support opts: { mode?: 'popup' | 'redirect' } as an option. PopUp can still be default, but ideally this would be configurable in web environments.

Describe alternatives you've considered:

Manually calling the Firebase JS API

Additional context:

Firebase docs for loginWithRedirect:
https://firebase.google.com/docs/auth/web/google-signin#:~:text=To%20sign%20in%20by%20redirecting%20to%20the%20sign%2Din%20page%2C%20call%20signInWithRedirect%3A

Note, we will need an additional function or event listener to check for/receive the redirect OAuth token/results:

https://firebase.google.com/docs/auth/web/google-signin#:~:text=Then%2C%20you%20can%20also%20retrieve%20the%20Google%20provider%27s%20OAuth%20token%20by%20calling%20getRedirectResult%20when%20your%20page%20loads

@mesqueeb
Copy link
Contributor

mesqueeb commented Nov 3, 2022

@lincolnthree
Just a friendly FYI on related info.
please note that login with redirect is currently completely broken on Safari 16.1, which is already used worldwide.

more info at:
firebase/firebase-js-sdk#6716

@lincolnthree
Copy link
Author

@mesqueeb Oh wow. Thank you for the warning about this. That is rough, and very unfortunate. I don't think it's a reason not to support this, but definitely relevant info for us end users :D

@robingenz robingenz added this to the v1.3.0 milestone Nov 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants