SohoHouse / nuxt-oauth

Simple OAuth2 integration for your Nuxt app
MIT License
122 stars 27 forks source link

Google Invalid Scheme #27

Closed joeinnes closed 4 years ago

joeinnes commented 6 years ago

https://github.com/SohoHouse/nuxt-oauth/blob/eed8a916c3343a2064f7a5b08b32df8d27cb5055/lib/handler.js#L30

'x-forwarded-proto' returns 'https,http,http', which Google rejects as an invalid scheme. I think this is probably correct behaviour from Google, although other providers may behave differently.

I forked and hardcoded https for myself, but don't want to PR it as that won't fit everyone's needs, and it unfixes #5

It might be worth considering using referer.split(':')[0], which is a bit ugly, but should work, I think.

samtgarson commented 4 years ago

Closing as stale.