Blazor.Auth icon indicating copy to clipboard operation
Blazor.Auth copied to clipboard

It is possible to change AccessToken cookie name?

Open drakoo320 opened this issue 5 months ago • 5 comments

It is possible to change AccessToken cookie name?

drakoo320 avatar Jul 16 '25 11:07 drakoo320

Hello @drakoo320

Not currently, no. Do you need to change it? It could probably be implemented. What is your use case for this?

YuriyDurov avatar Jul 16 '25 15:07 YuriyDurov

Cookies are saved per domain. I host applications on a single domain, e.g., domain.com/client1 domain.com/client2 And these connect to the target server using ARR. If all applications have the same cookie name, they cannot be used simultaneously. Logging in to one will log you out of the other.

drakoo320 avatar Jul 17 '25 05:07 drakoo320

Doesn't this seem like more of a job for the cookie's path, rather than it's name?

YuriyDurov avatar Jul 17 '25 06:07 YuriyDurov

This may be the solution, but can this be set in Blazor.Auth?

drakoo320 avatar Jul 17 '25 06:07 drakoo320

Not at the moment.

Will consider allowing configuring either cookie name of its path in one of the future versions.

YuriyDurov avatar Nov 19 '25 07:11 YuriyDurov