As far as I see, normally OpenID libraries like jopenid show how you can create a link on a webpage that redirects users to a provider, and then have this provider forward them to a specified page with the authentication information.
I also see that whenever I visit site like StackOverflow, I do not have to click the “log me in” button. Once I log in with my Google account, it remembers me.
How can I achieve this effect, so that I don’t have to ask users to log in every time? How does StackOverflow do it?
I am taking my first baby steps with OpenID, so please have mercy if I am getting something wrong.
Once you have verified the user’s identity via OpenID you can issue them a persistent cookie, one that doesn’t expire or has a long expiration. Use this cookie to authenticate them on subsequent requests, renewing it (extending any expiration) as needed.