fisayoafolayan / laravel-multiple-auth

A simple implementation of multiple authentication in Laravel. To follow along, this application has been documented as an article on Pusher blog.
81 stars 60 forks source link

Route [login] not defined #5

Open modnar1226 opened 4 years ago

modnar1226 commented 4 years ago

desired outcome: login in with good credentials, redirect to dashboard.

actual outcome: InvalidArgumentException Route [login] not defined.

laravel 5.8 ubuntu 19

i am using a subdomain admin.site/ i can login but it goes through the default authenticate middleware and doesn't touch the unauthenticated() method created in the exception\handler class.

Im pretty sure everything else is correct but i'm really not sure what is happening

  1. is the custom method needed if it goes through the authenticate middleware anyway?
  2. i can probably work around this if i could access the $request::current() method inside the authenticate class but can't.
  3. i can likely use the session data for header host to determine the subdomain, but that seems a bit hacky. If it is possible to access the $request::current() method inside of the custom unauthenticated() method that would be great if it can be explained how to route the request to the unauthenticated method.