white-article-28775
07/11/2022, 9:29 AMhigh-optician-2097
white-article-28775
07/11/2022, 9:39 AMhigh-optician-2097
white-article-28775
07/11/2022, 9:48 AMwhite-article-28775
07/11/2022, 10:19 AM{
"docs": "<https://www.ory.sh/kratos/docs/debug/csrf>",
"hint": "The anti-CSRF cookie was found but the CSRF token was not included in the HTTP request body (csrf_token) nor in the HTTP Header (X-CSRF-Token).",
"reject_reason": "The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."
}
any idea about why this might be? is it because it's an admin route?high-optician-2097
white-article-28775
07/11/2022, 10:23 AMory.adminExtendSession(sessionId)
which sends a request to
<http://localhost:3000/api/.ory/admin/sessions/0c265514-66b8-4348-87ca-7e3c3fbd5e21/extend>
with this cookie:
csrf_token_2bba5bc92d1ceadb8101f6494f1cdb7bd3475db07f08765d50b0106bdd62d178=MPlxotz505JKRMOEAjCYEJMBGH1KebwjPG8i17m3BGI=; ory_kratos_session=MTY1NzUzNDQzMnxzcFJCc3ZqQzhKM2xqNnBySWlRbkxFTWhuckZpYXVPVlFubHQycGg5aFpCbDFMSDc5alMtS0xsRTZibWJvNjRDdWRlc1ctaGFhN1dXWUQtdzVtVkh3dUZFRmVwTFVYaGtGQk1taWhWSnJ2dGFleGJYTTF2b3JxMW9KYU9XV1JXdEl1YV9FOW93OVE9PXyQvgE_X5g_dzs_h5Cee5GHWVteizJK7V7hu0hvMT26Pw==
high-optician-2097
white-article-28775
07/11/2022, 10:24 AMhigh-optician-2097
white-article-28775
07/11/2022, 10:27 AMory.toSession()
.then(({ data: oldSession }) =>
ory.adminExtendSession(oldSession.id).then(({ data: newSession }) => setSession(newSession)),
)
.catch(() => setSession(undefined));
high-optician-2097
white-article-28775
07/11/2022, 11:21 AMwhite-article-28775
07/11/2022, 11:21 AMhigh-optician-2097
white-article-28775
07/11/2022, 11:45 AMhigh-optician-2097
white-article-28775
07/11/2022, 12:30 PMhigh-optician-2097
white-article-28775
07/11/2022, 2:09 PMwhite-article-28775
07/12/2022, 1:30 PMhigh-optician-2097
white-article-28775
07/12/2022, 1:33 PMhigh-optician-2097
high-optician-2097
white-article-28775
07/12/2022, 1:55 PMwhite-article-28775
07/12/2022, 1:55 PMwhite-article-28775
07/12/2022, 1:56 PM<https://auth-dev.myapp.com>
<https://auth-admin-dev.myapp.com>
white-article-28775
07/12/2022, 1:56 PMhigh-optician-2097
white-article-28775
07/12/2022, 1:59 PMauth-dev
white-article-28775
07/12/2022, 2:00 PM<http://myapp.com|myapp.com>
in this case being the TLD for the entire app with all the serviceshigh-optician-2097
high-optician-2097
white-article-28775
07/12/2022, 2:02 PMhigh-optician-2097
white-article-28775
07/12/2022, 2:08 PMwhite-article-28775
07/12/2022, 2:08 PMhigh-optician-2097
high-optician-2097
withCredentials: true
is the valuehigh-optician-2097
white-article-28775
07/12/2022, 2:13 PMtrue
, but I'll give it a shot anywayhigh-optician-2097
white-article-28775
07/12/2022, 2:17 PMwhite-article-28775
07/12/2022, 2:17 PMwithCredentials
white-article-28775
07/12/2022, 2:17 PMThe value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
high-optician-2097
white-article-28775
07/12/2022, 2:19 PMhigh-optician-2097
white-article-28775
07/12/2022, 2:19 PMwhite-article-28775
07/12/2022, 2:23 PM