views:

35

answers:

1

I've come across the following situation when using OpenID and Google as the authenticator.

If you type siteName.com it takes you to http://sitename.com

Which returns a different token than if I were to login to www.siteName.com, which would take me to http://www.siteName.com

As a result, Google returns a different authentication token. Is there a simple fix around this? Maybe redirect the user from siteName.com to www.siteName.com? Would this be a server issue, or is this something I can do programmatically?

Thanks in advance for any answers, this question had plagued me for some time now as I just figured out why others had been receiving different credentials upon logging in.

+2  A: 

What Google is keying off of is the realm (and/or return_to, but probably just realm) in your OpenID request. So if you change your code to use consistent values there, and Google sends users back to a consistent domain on the return_to, your users will have consistent identifiers.

keturn
Thanks, that solved the problem!
MunkiPhD