4

I want use json web token in my new project. In this project, I use angularjs and ruby on rails in this project.

Now I want use jwt in project. Before I use devise for user management in back end server, but now I don't know is true that I use devise with jwt or not. By information that I find, devise is work by session, and one of the perpose of jwt is remove the session.

Question: Is it correct to use devise with jwt or I have to write a simple user management instead of devise and just save user information (email and password) on database?

1 Answer 1

2

I wrote the example that @pankas mentioned. You can see a screencast walkthrough here: https://www.youtube.com/watch?v=_CAq-F2icp4

In my example, we bypass the standard session management provided by devise and simply check the validity of the JWT. Now, why would you still use devise? Well you certainly don't have to. However, using devise you get a lot of other benefits for free right out of the box - mainly you get a reliable platform to handle user registration and authorization. That's why I worked to build a solution that integrated the two. I still use devise for everything else aside from the session management and that was reason enough to perform the integration. I hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.