Token-based authentication for Rails JSON APIs, seamlessly integrated with Devise and multiple client libraries.
Devise Token Auth is a Ruby gem that adds token-based authentication to Rails JSON APIs. It solves the problem of secure, stateless authentication for single-page applications (SPAs) and mobile apps by replacing cookie-based sessions with short-lived, refreshable tokens. The gem builds on the Devise authentication framework to provide a full suite of user management features.
Rails developers building JSON APIs for single-page applications, mobile apps, or any client that requires token-based authentication instead of traditional cookies.
Developers choose Devise Token Auth because it extends the familiar Devise ecosystem to handle modern token authentication securely, supports multiple client libraries out of the box, and manages complex features like token refresh and multi-client sessions with minimal configuration.
Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements short-lived tokens refreshed on each request, reducing token theft risks and enhancing security, as emphasized in the README's philosophy.
Supports separate sessions per device or client, enabling concurrent logins across multiple platforms without conflicts.
Offers dedicated frontend libraries for AngularJS, Angular, React/Redux, jQuery, and Flutter, simplifying API integration for diverse client applications.
Leverages Devise to provide registration, login, password reset, account confirmation, and OAuth2 via OmniAuth, minimizing custom development.
Tightly coupled with Devise, making it unsuitable for projects that avoid Devise or prefer alternative authentication libraries, limiting flexibility.
Requires coordinating both Devise and token auth configurations, which can be error-prone and time-consuming, as hinted by the detailed installation docs and community help requests.
Uses the WTFPL license, which is highly permissive but may raise legal or compliance concerns for enterprise projects due to its informal nature.