Welcome Guest, Not a member yet? Register   Sign In
Ion_auth CI4 - Configuration problem
#3

(This post was last modified: 05-16-2020, 10:14 PM by kabeza.)

Edit:

Solved it by removing all ionauth files.
Then I installed ionauth with composer
https://github.com/benedmunds/CodeIgnite...uth/tree/4


Code:
    class Client extends BaseController
{
    protected $ionAuth;
    
    public function __construct()
    {
        $this->ionAuth = new \IonAuth\Libraries\IonAuth();
    }

    public function index()
    {
        if(!$this->ionAuth->loggedIn()){
            // note the auth without / at beg. nor end that's the route defined later
            return redirect('auth/login');
        }
        else {
                echo "Logged in user";
        }
    }
}

My Routes

Code:
$routes->group('auth', ['namespace' => 'IonAuth\Controllers'], function ($routes) {
    $routes->add('login', 'Auth::login');
    $routes->get('logout', 'Auth::logout');
    $routes->add('forgot_password', 'Auth::forgot_password');
});

Now I have to work with the IonAuth views
Reply


Messages In This Thread
RE: Ion_auth CI4 - Configuration problem - by kabeza - 05-16-2020, 08:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB