jedireza / frame

:bulb: A user system API starter
https://jedireza.github.io/frame/
MIT License
740 stars 157 forks source link

JWT support #148

Closed schengnz1 closed 7 years ago

schengnz1 commented 7 years ago

From briefly reading the code, Frame supports cookie-based session. We are looking to use JSON Web Token (JWT) instead of cookie.

If I understand the code correctly, Frame currently does not support JWT. What does it take to add JWT support, and how doable/easy is it?

Thanks.

jedireza commented 7 years ago

Thanks for opening an issue.

Frame is actually using basic http authentication by default. With Aqua though, I went with cookies.

You can swap out strategies pretty easily. Once you add or replace the strategy in server/auth.js, all you need to do is update the config for the route handlers.

Do let me know if you're willing to share your progress with JWT, maybe we could add a wiki page about it.

bmgdev commented 7 years ago

+1

lostdalek commented 7 years ago

I've just began an implementation of a JWT strategy for my own needs, Hapi to share: https://github.com/lostdalek/frame/tree/feature/jwt it is pretty straighforward indeed! thanks for your work @jedireza

bmgdev commented 7 years ago

@lostdalek really great of you to share, much appreciated as always.