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

Handle "form_post" OAuth and OpenID responses (fix for Apple OpenID) #16231

Merged
merged 11 commits into from
Nov 1, 2022
Merged

Handle "form_post" OAuth and OpenID responses (fix for Apple OpenID) #16231

merged 11 commits into from
Nov 1, 2022

Conversation

aidenfoxx
Copy link
Contributor

@aidenfoxx aidenfoxx commented Oct 30, 2022

Description

This should allow both standard and "form_post" response modes from OpenID and OAuth providers. Adding the following option to a provider config will trigger the new flow: AUTH_PROVIDER_PARAMS="{"response_mode":"form_post"}".

This is required by Apple to return the user email.

Also removed a superfluous check in the router which is covered by getUserID, and add a missing "state" variable check related to that.

Type of Change

  • Bugfix
  • Improvement
  • New Feature
  • Refactor / codestyle updates
  • Other, please describe:

Requirements Checklist

  • New / updated tests are included
  • All tests are passing locally
  • Performed a self-review of the submitted code

If adding a new feature:

@aidenfoxx aidenfoxx marked this pull request as draft October 30, 2022 12:23
@aidenfoxx
Copy link
Contributor Author

@rijkvanzanten I've tested this with "form_post" via Google, but I've not tested Apple (because fuck paying £79 for the privilege). SMH Apple! 😠

If you're able to test the configuration in the attached Docs PR, it would be appreciated.

@aidenfoxx aidenfoxx marked this pull request as ready for review October 30, 2022 13:11
@rijkvanzanten rijkvanzanten merged commit 05c045e into directus:main Nov 1, 2022
@rijkvanzanten rijkvanzanten added this to the Next Release milestone Nov 1, 2022
@aidenfoxx aidenfoxx changed the title Handle "form_post" OAuth and OpenID responses Handle "form_post" OAuth and OpenID responses for Apple OpenID Nov 2, 2022
@aidenfoxx aidenfoxx changed the title Handle "form_post" OAuth and OpenID responses for Apple OpenID Handle "form_post" OAuth and OpenID responses (fix for Apple OpenID) Nov 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants