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

CSRF token mismatch showing when try to register #2

Open
Jatin-73 opened this issue Oct 1, 2022 · 6 comments
Open

CSRF token mismatch showing when try to register #2

Jatin-73 opened this issue Oct 1, 2022 · 6 comments

Comments

@Jatin-73
Copy link

Jatin-73 commented Oct 1, 2022

I have followed all instructions. but after all configuration. it showing me error CSRF token mismatch when try to register.
Screenshot from 2022-10-02 01-54-25

@suresh-ramani
Copy link
Owner

If you are trying it on localhost, so u can try this one: (.env) settings: SESSION_DOMAIN=localhost SANCTUM_STATEFUL_DOMAINS=localhost

@Jatin-73
Copy link
Author

Jatin-73 commented Oct 2, 2022

Still facing same error.

This is my .env file you can see.

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:YbJfksP5wmHHN5h53Q6YSzfEc9JppA4lH1Bl9JI8Tj0=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=larasanctum-authvue
DB_USERNAME="james"
DB_PASSWORD="James!@#$%^&*()2907"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=cookie
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

SANCTUM_STATEFUL_DOMAINS=localhost
SESSION_DOMAIN=localhost

@suresh-ramani
Copy link
Owner

Check with this:

SANCTUM_STATEFUL_DOMAINS=localhost, 127.0.0.1
SESSION_DOMAIN=localhost, 127.0.0.1

@Jatin-73
Copy link
Author

Jatin-73 commented Oct 2, 2022

Still it showing me same issue.

@suresh-ramani
Copy link
Owner

Please share your code with me I will check.

@Jatin-73
Copy link
Author

Jatin-73 commented Oct 3, 2022

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

2 participants