delight-im / delight-im/PHP-Auth
Compatibility with Redis for User Sessions
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
Is this compatible? So far I'm unable to get it working. Redis is installed and PHP is configured for user sessions. This is confirmed working using below snippet. Each time you send a request with a given PHPSESSID, the counter increments by one.
After clearing all cache in the browser, I login to the app. The below call to auth->login does not throw an exception, so it seems like that is still working.
$auth->login($_POST['email'], $_POST['password']);
In the HTTP response, I do not see a new cookie being set. Normally a new cookie is set post auth.
Then I visit an authenticated page.
The below code runs, and basically the user is never being shown as logged in. I also notice a new cookie being set, which doesn't seem normal.
if ($auth->isLoggedIn()) {
I'm currently going through this link to try to resolve this:
https://github.com/delight-im/PHP-Cookie#reading-and-writing-session-data
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported login flow with Redis-backed PHP sessions, using auth->login() and auth->isLoggedIn() as the entry points and comparing the cookies before and after authentication. Review the linked PHP-Cookie session documentation; done means the authenticated request retains the expected session and isLoggedIn() recognizes the user without an unexpected new cookie.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, redis
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100