Hi,
We want to set the HttpOnly = true and Secure = true for the below cookies
Abp.TenantId Abp.AuthToken Abp.AuthRefreshToken
So how can we do for these cookies. And after doing it everything should work as it is.
We even try the below links for the Abp.AuthToken and Abp.TenantId but it didn't work. https://support.aspnetzero.com/QA/Questions/11542/vulnerabilities---how-to-set-AbpAuthToken-cookie-Secure-flag-to-true https://aspnetzero.com/blog/http-only-anti-forgery-token-in-asp.net-zero
We have attached the screenshot for your reference.
Need your urgent support on this. Thank You
13 Answer(s)
-
0
Hi @KPCS
For
Abp.AuthToken
andAbp.AuthRefreshToken
you can setHttpOnly
as shown below;Yoıu can do the same for
Abp.TenantId
. To do this, you can create a new controller in Host project and call it's method with to set a cookie value in the callback event ofIsTenantAvailable
call on login page.Then, you need to write a custom middleware to get tokens and set them to request headers as shown below;
-
0
Do you host Angular app and Host app under the same domain ? If so, is it possible to share the live app URL via [email protected] ?
-
0
Hi @ismcagdas
We have a same domain but different ports. Example: https://123.123.1.1:8084 -- Frontend -> https://qa.sapp.com https://123.123.1.1:8085 -- Backend -> https://apiqa.sapp.com
It's not possible to share a live app URL. But we share a code base (fresh boiler plate) implementing the last solution provided by you, on the above mail.
-
0
Hi,
Sorry for our late reply. We created a draft blog post about this use-case, you can check it here https://github.com/aspnetzero/documents/pull/277. It is currently under review but I think it will help you.