jaredhanson / passport-google

Google (OpenID) authentication strategy for Passport and Node.js.
MIT License
149 stars 80 forks source link

Windows Azure Websites is not handling /auth/google/return properly for some reason. #11

Closed chevcast closed 11 years ago

chevcast commented 11 years ago

This may be the same issue as: https://github.com/jaredhanson/passport-google/issues/6

I just want to make sure this gets exposure so we can figure it out.

Here is a detailed screencast showing the issue. I hope this helps get it resolved. I start off showing passport-google working great locally, then I publish to Azure Websites and show how it fails when google redirects back to root/auth/google/return.

http://www.youtube.com/watch?v=nZEBmvFb65k

jaredhanson commented 11 years ago

Thanks for the screencast. Can you try setting the profile option to false, and see if that has an impact when deployed on Azure.

I'm curious to see if this is hitting against some maximum URL length. The URL I attempted was 1364 characters long, of which most was attribute exchange params. Turning this off will shorten the URL, and I'd like to see if that dispatches correctly.

chevcast commented 11 years ago

You were correct, that did it. I had suspected it was something to do with the query string because I could tack on random query string variables and /auth/google/return would respond, but not to the google string. That seems like an arbitrary limitation to enforce.

For obvious reasons though, I no longer have access to information about the user.

http://i.imgur.com/S1iz930.png

Is there another way to get that information?

jaredhanson commented 11 years ago

Yep, sure enough.

This link: 1071 characters long does work :)

This link: 1072 characters long does not work :(

chevcast commented 11 years ago

Too bad google can't POST back to the return URL.........or can it?

jaredhanson commented 11 years ago

I'd recommend switching to passport-google-oauth for Google auth, rather than OpenID. Profile data isn't exchanged via query parameters using OAuth, so you won't run into the limit.