-
Notifications
You must be signed in to change notification settings - Fork 930
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
401 error when using cookies and not token #550
Comments
Have a look at this might help you with the solution |
same here...
|
I'm having the same issue as well. There has to be a better way to see if user is logged in on cookie flow that doesn't involve getting a 401 from the user endpoint. And with the user endpoint set to false, you're always logged in. Seems like getting the logged in status in general for the cookie flow is a little off. |
same here ... any solution ? ====== set user to false and get user manually
|
Same issue here... Can this be even fixed? |
Yeah, it seems pretty broken. Glad it's not just me. Disabling the feature altogether and grabbing that data manually seems like a viable workaround at least. |
Closing here, as cookie scheme and laravel sanctum provider are now available in auth v5. |
any update on this? |
@GanchoDanailov @planetchili @pawel-marciniak @ryzexsp @brcpar @dloused @tiran133 @AndrewSavetchuk Hey guys! This issue was already fixed :) You should use cookie scheme, which depends on cookie instead of token. And if you are using laravel sanctum, then I recommend the laravel sanctum provider. Both are available in auth v5. We now recommend using v5 instead of v4. See status and #893 |
WHen i use laravel airlock with nuxt js and auth module on every page i navigate i get 401 error without being authenticated. i put correct middleware on every route. why is that happen? when i login all things works properly.(i use spa mode but i am curious how can i make things works on unversal mode)
this is my nuxt configuration:
axios: { baseURL: 'http://app.cheer.test/', withCredentials: true }, auth: { redirect: { login: '/login', logout: '/', callback: '/login', home: '/home' }, strategies: { local: { endpoints: { login: { url: 'login', method: 'post', withCredentials: true, headers: { 'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/json' } }, logout: { url: 'logout', method: 'post', withCredentials: true, }, user: { url: '/api/user', method: 'get', propertyName: 'user', withCredentials: true, headers: { 'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/json' } }, home: '/home' }, tokenRequired: false, tokenType: false } } },
The text was updated successfully, but these errors were encountered: