admin管理员组文章数量:1310074
I have a Nuxtjs 3 app and a Laravel project in production.
I have my custom Authentication system based on a token from the backend, token": "TOKEN FROM SANCTUM,
and linked with the Nuxtjs project. Everything with it works perfectly locally.
When I deploy the Nuxt files on the production server the user is authenticated when refreshed it gets logged out!
So the system design now is:
- Old Laravel app (example)
- New Nuxt js project
- my new API for the Nuxt app (api.example)
How do I deploy?
I run in Nuxt js project npm run generate
and take all files that are in .output/public
folder to the Laravel project(old one) and put it in public
folder with this code in web.php
:
Route::get('{any}', [RedirectableLinkController::class, 'show'])->where('any', '.*');
in RedirectableLinkController.php
public function show()
{
return file_get_contents(public_path('index.html'));
}
I got the User is authenticated when refreshed it gets logged out!
even though there is a token in Cooike I do not know what is the problem ! and whats debug cuz the console does not show any error!:(
本文标签: laravelUser is authenticated when refresh it gets log outStack Overflow
版权声明:本文标题:laravel - User is authenticated when refresh it gets log out? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741843133a2400622.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论