Hi, just messing with some facebook auth and noticed that on the request before i Redirect::to( '/' ), the URL has "#=" on the end and now when I use any Redirect, it keeps the hash on the end and is driving me nuts. Anyone know how to ignore the hash?
regards
I already have :-)
Redirect::to( '/' );
public function login() {
$code = Input::get( 'code' );
$fb = OAuth::consumer( 'Facebook' );
if ( ! empty( $code ) ) {
try {
$token = $fb->requestAccessToken( $code );
$user = $this->user();
$email = $user['email'];
$userModel = User::firstOrNew( array( 'email' => $email ) );
$userModel->email = $email;
$userModel->first_name = $user['first_name'];
$userModel->last_name = $user['last_name'];
$userModel->username = username( $user['first_name'] . ' ' . $user['last_name'] );
$userModel->password = Hash::make( $user['id'] );
$userModel->save();
Session::set( 'authentication', 'facebook' );
Auth::loginUsingId( $userModel->id );
return Redirect::home();
}
catch( Exception $e ) {
return Redirect::to( '/facebook-login' );
}
} else {
$url = $fb->getAuthorizationUri();
return Redirect::to( (string) $url );
}
}
#edit just removed that redirect and added in the home named redirect route to see if that worked but sadly not.
cmon someone must have come across this before?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community