Skip to main content
Pricing Community Docs Get Started GitHub My Account
Community
Search
Log In
Log In Sign Up
A

alyn jones

Joined May 16, 2025 Last seen Jun 3, 2025
Posts 1 Comments 2

⁨alyn jones⁩'s Posts

Newest Top
Newest Top
A alyn jones May 16, 2025

Auth/session not syncing on Laravel 12 – Waterhole creates user_id = null session and fails to detect logged-in user

Actions

Hi Waterhole team,

I'm using Waterhole v0.4.12 with Laravel 12.14.1.

Everything is installed and configured according to your official docs:

  • Laravel guard is web
  • App\Models\User implements AuthenticatesWaterhole and HasWaterholeUser
  • toWaterholeUser() returns a valid PendingUser
  • Waterhole's built-in auth is disabled (auth.php)
  • Session driver is database
  • SESSION_DOMAIN is .kinksters.test
  • Waterhole route prefix is /forum
  • Login override is done via ForumRoutes::add() as instructed

✅ Repro Steps:

  1. Log in to the Laravel app via /login
  2. Laravel session is created with user_id = 2
  3. Visit /debug-session — shows auth_user: 2 and correct session key
  4. Visit /forum
  5. A new session is created with user_id = null
  6. Waterhole does not detect the user and redirects to login
  7. Visiting /login returns to /dashboard — infinite loop

🧪 What I've Tried:

  • Rebinding user provider via AppServiceProvider
  • Creating middleware to manually sync session and log user in
  • Manually booting session via a custom service provider
  • Verified guard hashes (login_web_xxx) match via debug tools
  • Upgraded to Laravel 12 and cleared all caches
  • All cookies and session IDs are shared correctly
  • Session ID remains the same between / and /forum

❗Expected:

Waterhole should recognize the logged-in Laravel user and auto-link/create the corresponding wh_users record.


This seems to be caused by Waterhole accessing the auth guard before Laravel has fully restored the session (especially under the Laravel 11+/12 bootstrap/app.php lifecycle).

Any help or patch would be greatly appreciated. I can provide a minimal repro if needed.

Thanks for your hard work on Waterhole — it’s a fantastic project and I really want to use it in production.

🎉 1 Hooray Loading...
3 ⁨3⁩ ⁨comments⁩
© 2025 Waterhole Pty Ltd
  • Product
    • Pricing
    • Releases
    • Roadmap
    • Demo
  • Resources
    • Documentation
    • Support
    • Experts
    • Blog
  • Community
    • Community
    • Twitter
    • GitHub
  • Company
    • Terms & Privacy
    • Software License