Sanic-JWT-Extended icon indicating copy to clipboard operation
Sanic-JWT-Extended copied to clipboard

support for cookie as jwt token storage

Open sjquant opened this issue 5 years ago • 7 comments

flask-jwt-extended supports using cookie as jwt token storage, has utility function like set_access_cookie, set_refresh_cookie, and config options like JWT_COOKIE_CSRF_PROTECT.

I'm developing website using Nuxt (Vue SSR Framework), and I want to use cookie for authentication in server-side rather than localStorage. But I don't think this project supports it now. Do you have any plan for this?

sjquant avatar Oct 06 '19 14:10 sjquant

Yes, cookie is currently not supported now. but I don't have detailed plan for that yet.

honestly, I have plan for 1.0 release with few major changes. I'll think about adding it to the 1.0 version, so I hope you wait.

rscarrera27 avatar Oct 07 '19 02:10 rscarrera27

If you want, you can open cookie support PR

rscarrera27 avatar Oct 07 '19 02:10 rscarrera27

@NovemberOscar Thanks for early response. I will try, but I'm not sure I can take much time!

sjquant avatar Oct 08 '19 05:10 sjquant

@sjquant 1.0.dev2 released and cookie will added soon. currently supports query and headers.

rscarrera27 avatar Nov 25 '19 23:11 rscarrera27

@NovemberOscar I'm really looking forward to that : )

sjquant avatar Nov 26 '19 00:11 sjquant

@sjquant

Latest version 1.0.dev6 now contains support for reading cookie with CSRF support.

cookie setter utils similar to flask-jwt-extended will be release in 1.0-dev.10 or later

rscarrera27 avatar Dec 08 '19 06:12 rscarrera27

@NovemberOscar Thanks for actively maintaining this project.

sjquant avatar Dec 08 '19 11:12 sjquant