As well as a normal user/pass login, I have a Facebook connect button on my site.
With user/pass, I've set up a "Remember me" check box. If checked, I create a token and save it as a cookie, and into the DB, so it can be used for auto logins after a php session expires.
My Facebook login is the same as the other - once FB authenticates, I log them into their account on my site by matching their FB id to the one in my database.
I'd also like Facebook sign ins to be able to use the Remember me checkbox ie if checked, and a successful Facebook auth occurs,I create a token and save it as a cookie and into my DB, ready for auto logins just like with the user/pass set up.
However, I need to somehow tell my server - "hey, this successful FB login also had the Remember me checkbox selected, so create the token and cookie".
I'm currently doing it using javascript abnd jQuery, where when the FB button is clicked, the JS stops the Facebook login, uses jquery to hit up a php script which just sets a session var 'rememberMe' to 1, then JS returns back to fire off the Facebook login link, and on a successful FB auth, I look for the 'rememberMe' session var when logging them into my system.
Problem is, sometimes the jQuery doesn't work, even though the process is exactly the same.
I'm wondering if there's a way, when logging on with Facebook, to send vars like a checkbox slection, and get that back with the auth URL string?
Or, should I just assume that anyone logging in with Facebook wants to be rememebered, and set up the cookie and token?
Thanks for your time and help.