I am using hybridauth to log users into my php site via facebook.
$hybridauth = new Hybrid_Auth( $config );
$facebook = $hybridauth->authenticate( "Facebook" );
$facebook_user_profile = $facebook->getUserProfile();
($config
contains the id and secret key for my app)
This is all working well, but I would like to redirect the user when returned to the callback url based on which page they have logged in from, so that I can return them to this location after login.
Is there a way to send custom variables with the authentication (such as a url or even a simple id) so I can read them at the other end of the process and know where the authentication request was initiated.
Is this possible, or am I barking up the wrong tree?
Extra kudos if anyone knows how to do this using hybrid, but any suggestions that put me on the right track are more then welcome.