Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not log in (error 401) #254

Closed
jmartsch opened this issue Nov 6, 2020 · 5 comments
Closed

can not log in (error 401) #254

jmartsch opened this issue Nov 6, 2020 · 5 comments

Comments

@jmartsch
Copy link

jmartsch commented Nov 6, 2020

I made a fresh install and migrated the database, then I try to login with default credentials:
Email: [email protected]
Pass: laravue

but I get Request failed with status code 401 for the user route
The message of the XHR Request in dev tools says "unauthenticated"

The return of the login route XHR reads

data: {id: 1, name: "Admin", email: "[email protected]", roles: ["admin"],…}
error: ""
success: true

Can you help me solve this problem?

@jmartsch
Copy link
Author

jmartsch commented Nov 6, 2020

Ok, it turned out, that I had to add my domain laravue.localhost to SANCTUM_STATEFUL_DOMAINS in the .env file

@jmartsch jmartsch closed this as completed Nov 6, 2020
@fawel11
Copy link

fawel11 commented Nov 30, 2020

It worked for me too.

@jggj21
Copy link

jggj21 commented Sep 30, 2021

This worked for me.

@massimodevitis
Copy link

now This worked for me
br
Max

@mnadeemijaz
Copy link

i have the same issue
but I have made virtual host idlpost.test
how can I resolve this issue

APP_URL=http://idlpos.test/

SESSION_DOMAIN=idlpos.test

SANCTUM_STATEFUL_DOMAINS=idlpos.test

any help please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants