Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session problem with Brave browser #274

Open
toffler1 opened this issue Apr 19, 2022 · 4 comments
Open

Session problem with Brave browser #274

toffler1 opened this issue Apr 19, 2022 · 4 comments
Labels

Comments

@toffler1
Copy link

Thanks for this awesome library - I'm using it a lot.
However, I'm facing session problems with brave browser and since there are a few people using this browser, I just wanted to mention it. It instantly looses session after login.
When login with the "remember me" option for 1 year, it keeps the session for a few minutes with brave.

@ocram ocram added the question label Apr 19, 2022
@ocram
Copy link
Contributor

ocram commented Apr 19, 2022

Thank you!

What version of Brave (and on what OS) are you using?

Could you open the developer tools and check the status of the two cookies, i.e. if they are created, with what parameters, and when they are lost? It’s probably best to start with a clean state of zero cookies for the domain.

@ocram
Copy link
Contributor

ocram commented Apr 19, 2022

And does your site happen to use frames?

@toffler1
Copy link
Author

toffler1 commented Apr 19, 2022

I'm using Version 1.37.116 Chromium: 100.0.4896.127 on windows 10 64 Bit.

The 2 cookies are created:
image

and should last the whole session.
All the PHP session variables are created as well - but only if i read them right after $auth->login($_POST['email'], $_POST['password']) ... 1 click on the page and the PHP session variables are gone, but the 2 cookies remain.

@ocram
Copy link
Contributor

ocram commented Apr 23, 2022

Thank you!

That could be the cause of the problem already. There should only be one session cookie (“PHPSESSID”). So these two are always re-created, even if you delete them entirely (and any other cookies for the domain)? If there are two, that could lead to a conflict, where the server does not receive the cookie it expects but the other one.

With “remember me” enabled, that should then be three cookies in your setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants