Laravel Breeze Next and Sanctum Token Mismatch - laravel

First of all this is working fine when I do it in localhost but if I try it to deploy in my production server the issue token mismatch appear when I try to login.
I already configure the FRONTEND_URL

Related

laravel fortify sanctum SPA issues on forge

My setup is working properly locally but apparently I'm getting a 401 issue on laravel forge for my laravel-fortify-sanctum
basically I use laravel fortify for authentication then sanctum to get a token after authentication process.
it works properly on my local setup but in laravel forge it's saying I'm still Unaunthenticated
laravel forge domains
api.domain.com
frontend.domain.com
SESSION_DRIVER=cookie
SESSION_DOMAIN=.domain.com
SANCTUM_STATEFUL_DOMAINS=*.domain.com
Am I missing something?

Vuejs and laravel 7 api unauthorized problem on production server

I have an application that uses laravel 7 api for the back end with passport for authentication. For the front end i am using vuejs. Everything is work fine in the local machine, but when i upload my application to the production server, i always get Error: Request failed with status code 401,
I googled a lot but found nothing to solve this problem.
I hope you help me.

Laravel/VueJs Sanctum CSRF mismatch when deployed

Can't seem to work out why I keep getting CSRF token mismatch with my deployed app. On local using valet it's working fine.
The backend and frontend are on 2 different servers but they share the same subdomain so surely this should work?
My local .env contains the following:
SESSION_DOMAIN=.rss.test
SANCTUM_STATEFUL_DOMAINS=front.rss.test:3001
My live .env contains the following:
SESSION_DOMAIN=.dally.tech
SANCTUM_STATEFUL_DOMAINS=rss.dally.tech
The API is sat on the domain:
rss-api.dally.tech
Really confused why this isn't working.

Insecure connection on localhost

I am using Laravel 7 and utilizing Laravel socialite package for the first time for authenticating with facebook.
The problem is I am on localhost and when I am redirected to facebook I am getting error saying
Facebook has detected that XYZ isn't using a secure connection to transfer information.
Until XYZ updates its security settings, you won't be able to use Facebook to log in to it.
I tried to configure my xampp to run localhost on https by following these methods
https://stackoverflow.com/a/28658969/12168002
https://www.youtube.com/watch?v=Mig9YPNiUZI
but none of them worked for me.
I watched few socialite installation videos and noticed that none of them was having secure connection but still able to authenticate user successfully.
Please highlight the actual cause of me getting this error and how can I fix this?

Deploy Laravel with Sanctum into Heroku - CSRF token mismatch

I developed a Laravel+Vue with Sanctum and deployed. On localhost works fine, I can login with my Vue form or with Laravel UI. In Heroku I get a CSRF Token mismatch error if I try to login with my Vue form; if I login with Laravel UI I get a 419 error page.
What I can note is that on my Heroku's app I haven't got any XSRF_TOKEN in my cookies, but in my localhost I have. I tried changing session driver from file to database driver as I read that in Heroku file driver doesn't work fine because of its storage system, with the same results (CSRF Token mismatch and not XSRF-TOKEN).
I also tried with http and https.
app/Http/Kernel.php in protected $middlewareGroups
// \App\Http\Middleware\VerifyCsrfToken::class,

Resources