Reposted/rephrased from http://forum.civicrm.org/index.php/topic,36059.30.html.
I am currently working on an extension to log in a user in CiviCRM using Facebook.
The user is sent to facebook for auth request/permissions, and if successful redirected to a callback page where it receives a code which is valid for one login. Now the server gets all the details to this page and create a contact and save it.
I am thinking of now sending back the user to the earlier page with the contact id and the checksum. Something which is described in the following link: https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails
Now I need to keep track of if someone is logged in, is there anything I can store this constraint into or I need something, or should I directly use SESSION and store it there?