nuxt-auth icon indicating copy to clipboard operation
nuxt-auth copied to clipboard

Set the secure attribute of the token cookies.

Open matteioo opened this issue 2 years ago • 2 comments

Describe the feature

I would appreciate it if there is a possibility to set the Secure attribute on both token and refresh cookies. Thus resulting in the cookies only being sent through HTTPS.

I will link the PR where I already made changes which worked in both relevant playgrounds. For now, the secureCookieAttribute defaults to false, even though I am open for discussions about a more secure default by switching it to true if not defined otherwise.

How would you implement this?

How about adding a new attribute in nuxt.config.ts in both ProviderLocal and ProviderRefresh? Nonetheless, open for other ways on how to implement the Secure attribute of the token and refresh cookies.

Additional information

  • [X] Would you be willing to help implement this feature?

Provider

  • [ ] AuthJS
  • [X] Local
  • [X] Refresh
  • [ ] New Provider

matteioo avatar Apr 07 '24 00:04 matteioo

I think not, you can configure it with auth js instead.

FerhatCengz avatar May 15 '24 18:05 FerhatCengz

Closed via #729

phoenix-ru avatar May 16 '24 10:05 phoenix-ru