05-25-2017, 11:23 PM
When a user logins with my google api function and is success full it adds # to the redirected controller url
I don't know how its adding the # hashtag to the redirect url I use vhost
Question is there away to stop the hashtag from showing up when user is redirect to there usercp?
![[Image: 3NmPQILJbu5E.png]](https://ibin.co/3NmPQILJbu5E.png)
I use this google api from here https://github.com/moemoe89/google-login-ci3
I don't know how its adding the # hashtag to the redirect url I use vhost
PHP Code:
http://domain.com/usercp#
Question is there away to stop the hashtag from showing up when user is redirect to there usercp?
PHP Code:
public function google() {
$googleplus_auth = $this->googleplus->getAuthenticate();
$googleplus_info = $this->googleplus->getUserInfo();
$google_data = array(
'google_id' => $googleplus_info['id'],
'google_name' => $googleplus_info['name'],
'google_link' => $googleplus_info['link'],
'image' => $googleplus_info['picture'],
'email' => $googleplus_info['email'],
'firstname' => $googleplus_info['given_name'],
'lastname' => $googleplus_info['family_name']
);
$login_google_userid = $this->login_model->login_with_google($googleplus_info['id'], $google_data);
$_SESSION['user_id'] = $login_google_userid;
redirect('usercp');
}
![[Image: 3NmPQILJbu5E.png]](https://ibin.co/3NmPQILJbu5E.png)
PHP Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['googleplus']['application_name'] = 'Some Name';
$config['googleplus']['client_id'] = '********; // Some id
$config['googleplus']['client_secret'] = '********'; // Some secret
$config['googleplus']['redirect_uri'] = 'http://www.mysetdomain.com/account/login/google';
$config['googleplus']['api_key'] = '********'; // Some api
$config['googleplus']['scopes'] = array();
I use this google api from here https://github.com/moemoe89/google-login-ci3