nhosoya / omniauth-apple

OmniAuth strategy for Sign In with Apple
MIT License
260 stars 99 forks source link

Fix scope encoding #66

Closed wilg closed 1 year ago

wilg commented 3 years ago

Making this PR because it seems that @karlentwistle's change never made it to master: https://github.com/fdoxyz/omniauth-apple/pull/1/commits/366272af2ddabf1c9609d18e3e6cca0f594c020e

When providing both email and name as scopes. For example "email name" the request URL is being incorrectly transformed with a + between the scope names rather than correctly using a %20.

Incorrect: "name+email" Correct: "name%20email"

@sebfie helpfully diagnosed the issue and figured out the fix here nhosoya#12 (comment)

I wondered if we could get this merged and released in the gem.

Closes nhosoya#12 Closes nhosoya#13

https://github.com/fdoxyz/omniauth-apple/pull/1/commits/366272af2ddabf1c9609d18e3e6cca0f594c020e

wilg commented 3 years ago

Actually now I'm confused, it seems like I still don't get name and email even with this change.

wilg commented 3 years ago

This does work, I had something wrong on my end.

waissbluth commented 3 years ago

Can confirm -- we have been using this fix for a while now

nov commented 1 year ago

this treatment should be done in omniauth-oauth2 or oauth2 gem layer.