Issue
I tried adding google one tap on a laravel app.
<div id="g_id_onload"
data-client_id="{{ config('google.google_client_id') }}"
data-login_uri="{{ route('google2.callback') }}"
_token="{{ csrf_token() }}">
</div>
But I still get a 419 PAGE EXPIRED
with a CSRF Token mismatch
exception with and without the _token
parameter.
How should I handle this on the post route?
Solution
For anyone with this problem the issue is that every parameter must be preceded by data-
so it has to be:
<div id="g_id_onload"
data-client_id="{{ config('google.google_client_id') }}"
data-login_uri="{{ route('google2.callback') }}"
data-_token="{{ csrf_token() }}">
</div>
Answered By - grimdbx Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.