All Projects → vonWolfehaus → sails-jwt-login

vonWolfehaus / sails-jwt-login

Licence: MIT license
How to implement login with JWT (JSON Web Tokens) in Sails 1.0

Programming Languages

javascript
184084 projects - #8 most used programming language
EJS
674 projects
Less
1899 projects

Projects that are alternatives of or similar to sails-jwt-login

Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (+527.78%)
Mutual labels:  jwt-authentication, jwt-auth
NodeScalableArchitecture
A Scalable Node Architecture/Server. This repository contains a complete implementation of writing scalable nodejs server/architecture on my medium blog.
Stars: ✭ 62 (+244.44%)
Mutual labels:  jwt-authentication, jwt-auth
Netcoreblockly
.NET Core API to Blockly - generate from WebAPI, Swagger, OData, GraphQL =>
Stars: ✭ 121 (+572.22%)
Mutual labels:  jwt-authentication, jwt-auth
Jwt
Go JWT signing, verifying and validating
Stars: ✭ 394 (+2088.89%)
Mutual labels:  jwt-authentication, jwt-auth
Quasar-JWT
Quasar - JWT Authentication Starter Kit
Stars: ✭ 38 (+111.11%)
Mutual labels:  jwt-authentication, jwt-auth
Laravel Jwt
Laravel with JWT Authentication for API development
Stars: ✭ 31 (+72.22%)
Mutual labels:  jwt-authentication, jwt-auth
Jwt Spring Security Jpa
Backend MVP showcasing JWT (Json Web Token) authentication with multiple login, timeout / refresh / logout (with in memory invalidation) using Spring Security & MySQL JPA.
Stars: ✭ 202 (+1022.22%)
Mutual labels:  jwt-authentication, jwt-auth
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (+733.33%)
Mutual labels:  jwt-authentication, jwt-auth
MyAPI
A template to create awesome APIs easily ⚡️
Stars: ✭ 117 (+550%)
Mutual labels:  jwt-authentication, jwt-auth
Laravel Jwt
Dead simple, plug and play JWT API Authentication for Laravel (5.4+)
Stars: ✭ 225 (+1150%)
Mutual labels:  jwt-authentication, jwt-auth
Jwt Auth Guard
JWT Auth Guard for Laravel and Lumen Frameworks.
Stars: ✭ 319 (+1672.22%)
Mutual labels:  jwt-authentication, jwt-auth
exposed-ktor-jwt
example of an exposed+ktor+jwt secured kotlin app sporting an angular frontend
Stars: ✭ 21 (+16.67%)
Mutual labels:  jwt-authentication, jwt-server
Nest Angular
NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript
Stars: ✭ 307 (+1605.56%)
Mutual labels:  jwt-authentication, jwt-auth
React Login
A client side implementation of authentication using react.js for my blog on medium. This is the second part of my previous blog on how to implement scalable node.js server.
Stars: ✭ 105 (+483.33%)
Mutual labels:  jwt-authentication, jwt-auth
API-Authentication-NodeJs
API Authentication using JWT's (JSON Web Tokens). Plug n Play inside any app which requires authentication. NodeJs Express MongoDB & Redis.
Stars: ✭ 162 (+800%)
Mutual labels:  jwt-authentication, jwt-auth
Php Jwt
Ultra lightweight, dependency free and standalone JSON web token (JWT) library for PHP5.6 to PHP8.0. This library makes JWT a cheese.
Stars: ✭ 214 (+1088.89%)
Mutual labels:  jwt-authentication, jwt-auth
spring-boot-refresh-token-jwt
Spring Boot Refresh Token using JWT example - Expire and Renew JWT Token
Stars: ✭ 156 (+766.67%)
Mutual labels:  jwt-authentication, jwt-auth
spring-boot-login-example
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example
Stars: ✭ 50 (+177.78%)
Mutual labels:  jwt-authentication, jwt-auth
smart-home
Control house using raspberry pi djago based secure REST api. Made using raspberry pi, arduino, django ,django REST and angular.
Stars: ✭ 30 (+66.67%)
Mutual labels:  jwt-authentication
december-2018-meetup
🤖 Build an API with Laravel 5.7
Stars: ✭ 27 (+50%)
Mutual labels:  jwt-authentication

NOTE: This is no longer maintained

There's security issues with this since it's so old.

sails-jwt-login

This is an example of a simple device-agnostic backend that implements login, signup, and logout using JSON Web Tokens. It is based on the jwt-login example, just upgraded to Sails 1.0 and modified to use cookies for web storage and the authorization header for other devices (eg mobile) to use.

This is a multiple page app using the built-in templating system (EJS) in order to demonstrate keeping a "session" by storing the JWT in a cookie. It also has server code (but not frontend code) that handles authorization using a header.

To be clear however, this is not intended as a tutorial on building SPAs, which would normally use a framework like Vue or React.

Relevant bits

  • assets/js/main.js contains the all of the front-end Javascript that makes the AJAX calls to register new users, login, and logout.
  • api/controllers/UserController.js contains the back-end code for signing up and logging in users, including creating new JWTs.
  • api/helpers/verify-token.js is a global helper that does the actual verification of JWTs for every request, as dictated by config/policies.js.
  • api/policies/isAuthenticated.js contains the code for authenticating a user via JWT, and redirecting unauthorized users to the login page
  • api/policies/checkForUser.js is similar to isAuthenticated.js, but allows logged-out users to continue. This is useful for things like the home page, which can display a customized welcome message to logged-in users but should be available to everyone.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].