|
Fix auth session persistence: add credentials:include to fetch and session_start to auth flow
- http.js: add credentials: 'include' to fetch() so cookies are sent with every API request (fixes /auth/me returning 401 after callback) - AuthControllerTrait::resolve_user(): ensure session_start() before reading - AuthController::callback(): ensure session_start() before writing - AuthService::handleCallback(): defer DB token persistence until local user ID is resolved; store temp token data in session - UserResolver: fix lastInsertId() method name, remove avatarUrl() call (use profile array instead) This fixes the loop where user was redirected back to /login after successful OAuth callback because PHP session cookie was not sent with the /auth/me request. |
|---|
|
|
| server/SHServ/Controllers/AuthController.php |
|---|
| server/SHServ/Integrations/GAuth/AuthControllerTrait.php |
|---|
| server/SHServ/Integrations/GAuth/AuthService.php |
|---|
| server/SHServ/Integrations/GAuth/Store/DbTokenStore.php |
|---|
| server/SHServ/Integrations/GAuth/UserResolver.php |
|---|
| webclient/src/api/http.js |
|---|