Base solution for your next web application
Open Closed

antiForgery.getToken() javascript api can not read cookie. #3014


User avatar
0
halitm created

Hi,

I need to add Antiforgery token to all request headers but

abp.security.antiForgery.getToken() javascript api can not read Cookie because Antiforgerytoken's cookie is httpOnly.

If there is not any better way to read Antiforgery token like abp.security.antiForgery.getToken() . I will read token from __RequestVerificationToken hidden input value.

Any suggestion ?

Thanks


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We use abp.security.antiForgery.getToken() without a problem, can you share a screenshot of your browser's cookies ? Also, which version of ABP do you use ?