Closed marijnbent closed 4 years ago
I can't confirm using the latest version of Jetstream (1.5.1) and Laravel (8.11.2):
axios.get('/api/user').then(response => {
console.log(response.data) // {"id":1,"name":"Test User"...}
})
It also works in Insomania using the Authorization
header:
> GET /api/user HTTP/1.1
> User-Agent: insomnia/2020.3.3
> Authorization: Bearer MY_API_TOKEN
> […]
{"id":1,"name":"Test User"...}
Make sure you have added your domain to stateful
option in the config/sanctum.php
file.
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Description:
The default /api/user route is not accessible. When logged out, the login page is shown. When logged in, you get redirected to the dashboard. When accessed using Insomnia with an Authorization header and valid API key present I get a
"message": "Unauthenticated."
.Steps To Reproduce: