How to redirect after google login using codeigniter?

前端 未结 2 1071
失恋的感觉
失恋的感觉 2021-01-28 20:17

controller:

public function login()
{
    if($this->session->userdata(\'loggedIn\') == true)
    {
        redirect(\'profile\');
    }
    if(isset($_GET         


        
相关标签:
2条回答
  • 2021-01-28 20:52

    Maybe late respond, as you can see when setting up the console, you need to add URL redirect when authenticating, please see image below. Thanks

    0 讨论(0)
  • 2021-01-28 21:10

    When you are going to redirect it in same controller in which you are working then just write the following code.

    $this->load->helper('url');
    
        if ($some_value === FALSE/TRUE)  {//You may give 0/1 as well,its up to your logic
    
                 redirect('same_controller/method', 'refresh');
        }
    

    And check whether you get $_GET['code']

    0 讨论(0)
提交回复
热议问题