Skip to content

Session is not starting after Login #243

Closed Answered by ibnsultan
watsefack asked this question in Q&A
Discussion options

You must be logged in to vote

TLDR; It's an SSL issue.

A quick Fix (Not Recommended)

If you happen to encounter the issue next time, add @session_start(); at the beginning of your public/index.php.

Recommended Fix

When you call auth()->useSession() , the below static method from the Leaf\Auth::class gets called

public static function useSession()
 {
      static::config('USE_SESSION', true);
      static::$session = Auth\Session::init(static::config('SESSION_COOKIE_PARAMS'));
 }

In the above function two other methods gets called config and $session, at this point I'd assume you know about config and it's not very relevant in this case, let's put our focus on $session which refers to Auth\Session::init() passing the c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ibnsultan
Comment options

Answer selected by ibnsultan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants