views:

28

answers:

1

I was under the impression that the open id for a user remains constant.

I am allowing users to setup open id with my site with 2 different screens in my app...

I was under the impression that the open id for a user is constant and will not change and I was planning to save it to my database for a given user,

However, to my suprise, I found different ids for the same user using the same google account in the two different screens.

How does open id actually work ?

Update: I found that google does so based on open ID realm. so for the same realm, two open ids will be same (irrespective of the url parameters)

+1  A: 

You've already found the answer to your question then: Google uses "directed identity", meaning the openid.realm determines the scope that an openid.claimed_id applies to. If you want both "screens" to get the same OpenID, make sure the realm is the same, perhaps by simplying it down to http://*.mydomain.com/, including the wildcard character.

Andrew Arnott