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

Many OAuth Providers Likely Broken by form_post instead of query auth URI #227

Open
chadrockey opened this issue Nov 22, 2024 · 0 comments

Comments

@chadrockey
Copy link

Internally, the authentication URIs are generated from https://www.googleapis.com/identitytoolkit/v3/relyingparty/createAuthUri?key={0}

This appears to easily handle the different providers, stays up to date, etc.

However, for some, and at least Apple, this no longer works. Apple forces the URI to have the form_post type instead of query, this means that the token returned is posted to the redirect url (firebase's server) instead of being able to this library to continue with the authentication process.

As a test, I edited the URI to use query instead of form_post. Unfortunately, Apple only allows form_post when you request the name or email scopes, so you need to also remove the scopes from the query.

With query and no scopes, the request succeeds and the rest of the code continues along fine. However, I'm pretty sure this will be horrible if you're creating an account and have no Name and no email. It at least works for a Firebase account with user/email, Google, and Apple associated.

@bezysoftware does this sound familiar? Do you have any ideas or known workarounds?

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

No branches or pull requests

1 participant