laravel / fortify

Backend controllers and scaffolding for Laravel authentication.
https://laravel.com/docs/fortify
MIT License
1.61k stars 294 forks source link

user/confirm-password middleware not working in subdomain #177

Closed GMounir closed 3 years ago

GMounir commented 3 years ago

Description:

RequirePassword (confirm.password) middleware not working with subdomain! always redirect back to /home page

Steps To Reproduce:

this is the response with dd() function in handle method, always redirect me back to home page!!!

Illuminate\Http\RedirectResponse {#348 ▼
  #request: Illuminate\Http\Request {#44 ▶}
  #session: Illuminate\Session\Store {#325 ▶}
  #targetUrl: "http://subdomain.fortify.test/user/confirm-password"
  +headers: Symfony\Component\HttpFoundation\ResponseHeaderBag {#349 ▶}
  #content: """
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8" />
            <meta http-equiv="refresh" content="0;url='http://subdomain.fortify.test/user/confirm-password'" />

            <title>Redirecting to http://subdomain.fortify.test/user/confirm-password</title>
        </head>
        <body>
            Redirecting to <a href="http://subdomain.fortify.test/user/confirm-password">http://subdomain.fortify.test/user/confirm-password</a>.
        </body>
    </html>
    """
  #version: "1.0"
  #statusCode: 302
  #statusText: "Found"
  #charset: null
  +original: null
  +exception: null
}

also is not throwing error when this is not declared in Fortify Service Provider

        //Fortify::ConfirmPasswordView(function () {            
        //    return view('auth.confirm-password');
        //});
driesvints commented 3 years ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Thanks!

GMounir commented 3 years ago

Thank you for reply,

actually i searched all the web for a solution with no result, but I'll post it in one of channels list Thnaks!