I have a facebook login function where I instantiate Hybrid_Auth and the user is authenticated:
$oauth = new Hybrid_Auth( $config );
//go to facebook
$provider = $oauth->authenticate('Facebook');
//continue script?
$profile = $provider->getUserProfile();
die(var_dump($profile));
(as in the example here (configuration & usage) hybridauth.github.io/hybridauth/userguide )
But how is the script supposed to continue where it left off, after the
"->authenticate('Facebook')"?
In all the examples I have seen, a large part seems to be implicit information that is left out, and not being explained.
On "->authenticate", the user is redirected to facebook and then redirected back to a specific url. I have specified a redirect URI in facebook developers, like:
https://myweb.com/fbauth/authenticate?hauth.done=Facebook
and I have a "base_url" in the config array, which I guess is the url that the user returns to after login. I pointed it to the same function where I do the authentication:
'base_url' => 'https://myweb.com/fbauth/authenticate',
So after authentication the function starts again from the beginning, and if it has the "authenticate" slug, I try to run: Hybrid_Endpoint::process(); but this results in a 404. But I would rather have resumed from after the authentication so I can get the result of $profile. How is this supposed to be handled, and how can I get the result? I use Laravel by the way.