0

I am using sharedwithexpose.com. It seems to work well. localhost/login goes to my login page, as does subdomain.us-1.sharedwithexpose.com/login. however, when I actually login, using subdomain.us-1.sharedwithexpose.com/login the computer returns "419 Page Expired" and the url is changed to localhost/login.

will changing the value of the APP_ENV variable prevent the web.php routes file from changing the url back to localhost from subdomain.us-1.sharedwithexpose.com?

My routes are defined in web.php like

Route::middleware(['auth', 'verified'])->get('/home', function () {
    return view('home');
})->name('home');

That is the landing page after you login. My APP_ENV=local.

thanks.

rbd

1 Answers1

1
  1. First of all, you may try with browser refresh (Ctrl/cmd + Shift + r).

  2. Then check you have included @crsf in login form. like check this out

  3. and then check in .env file you have APP_URL="http://subdomain.us-1.sharedwithexpose.com" or APP_URL="https://subdomain.us-1.sharedwithexpose.com"

Mahmudul Hasan
  • 126
  • 2
  • 6
  • Hi. thank you. I do have @crsf in the login form. Rendered as: ``` ``` I have refreshed I added the APP_URL value as suggested. performed an Artisan Cache:Clear I am using Fortify Package the site continues to render the links with "localhost" in stead of the value in the APP_URL variable in .env. Any Thoughts? – Robert Bryan Davis May 16 '22 at 18:17
  • you may try `php artisan optimize:clear` in case of any cache related issue – Mahmudul Hasan May 16 '22 at 18:26
  • or please check with `dd($request->all()` and make sure it has `_token` before doing actual login stuff – Mahmudul Hasan May 16 '22 at 18:29
  • I think the issue comes before all that. I believe the problem lay with the laravel named routes. if I change
    to
    The login is successful. however when i use the named routes to produce appropriate links, the root domain gets changed to "localhost". Not sure why yet.
    – Robert Bryan Davis May 16 '22 at 19:14