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

Support response_mode=form_post for Apple adapter #82

Open
r2d4 opened this issue Dec 16, 2024 · 0 comments · May be fixed by #85
Open

Support response_mode=form_post for Apple adapter #82

r2d4 opened this issue Dec 16, 2024 · 0 comments · May be fixed by #85

Comments

@r2d4
Copy link
Contributor

r2d4 commented Dec 16, 2024

When requesting scopes with the Apple provider -- there's some bugs with the current adapter:

  • You must set response_mode=form_post on the authorization call
  • Accept a POST to /callback and parse the code and state from form data
  • Name/email are only returned the first time the user goes through the flow, they are added as part of the /callback formdata with the "user" key with the stringified JSON payload
{
    "email": "...",
    "name": {
        "firstName": "...",
        "lastName": "..."
    }
}

"form_post" response mode is actually part of the spec, so it could be implemented with the base oauth2 adapter, although I'm not sure how many other providers would use this. https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html

Additionally, the user info could be added to the raw tokenset object. Otherwise I'm not sure how the base OAuth2 adapter API should look (do other providers do things like this?)

devin-ai-integration bot added a commit that referenced this issue Dec 17, 2024
- Extend OAuth2 adapter to support form_post response mode
- Add POST callback handler for form data
- Include first-time user info in tokenset
- Make form_post support generic for other providers

Fixes #82

Co-Authored-By: [email protected] <[email protected]>
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 a pull request may close this issue.

1 participant