DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
496 stars 52 forks source link

[Bug] Losing intended url on SSO #667

Closed werner-h closed 3 weeks ago

werner-h commented 1 month ago

Environment:

Describe the bug: We are working with mail notifications templates which should redirect to resource urls. Without sso the user got redirected to the intended url but as soon as sso is enabled the user always got redirected to the default home path instead of the intended url.

Edit: Sorry I choosed the main repo instead of the dedicated Laravel repo.

stevebauman commented 3 weeks ago

Hi @werner-h,

The included SSO middleware doesn't perform any redirects at all. It simply authenticates the user if it can:

https://github.com/DirectoryTree/LdapRecord-Laravel/blob/master/src/Middleware/WindowsAuthenticate.php

This appears to be an application issue and not an LdapRecord-Laravel one. If you can submit reproduction steps and/or a repository to reproduce, then I will re-open this issue, thanks!

werner-h commented 3 weeks ago

Hi @stevebauman,

I have the problem with Laravel Nova, if I turn of the Windows IIS NTLM Authentication (Windows Authentication) and using the built in Laravel login form from Nova the user gots redirected to the target path.

If I enable NTLM authentication and the user was automatically logged in from the middleware the user is getting redirect to Laravel Nova initial path.

Any ideas how to debug this issue?