All Projects β†’ neroniaky β†’ Angular Token

neroniaky / Angular Token

Licence: mit
πŸ”‘ Token based authentication service for Angular with interceptor and multi-user support. Works best with devise token auth for Rails. Example:

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Angular Token

Devise token auth
Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Stars: ✭ 3,263 (+767.82%)
Mutual labels:  rails, authentication, oauth, devise
Paseto
Platform-Agnostic Security Tokens implementation in GO (Golang)
Stars: ✭ 461 (+22.61%)
Mutual labels:  authentication, auth, token
Vue Authenticate
Simple Vue.js authentication library
Stars: ✭ 1,350 (+259.04%)
Mutual labels:  authentication, oauth, auth
Github Create Token
Create a Github OAuth access token.
Stars: ✭ 6 (-98.4%)
Mutual labels:  authentication, oauth, token
Graphql devise
GraphQL interface on top devise_token_auth
Stars: ✭ 100 (-73.4%)
Mutual labels:  rails, authentication, devise
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (+362.23%)
Mutual labels:  authentication, oauth, auth
React Native Instagram Login
a react native instagram login component (support android & ios). Pull requests are welcome!
Stars: ✭ 139 (-63.03%)
Mutual labels:  authentication, oauth, auth
Devise
Flexible authentication solution for Rails with Warden.
Stars: ✭ 22,088 (+5774.47%)
Mutual labels:  rails, authentication, devise
Devise Jwt
JWT token authentication with devise and rails
Stars: ✭ 881 (+134.31%)
Mutual labels:  rails, authentication, devise
Simple token authentication
Simple (but safe) token authentication for Rails apps or API with Devise.
Stars: ✭ 1,474 (+292.02%)
Mutual labels:  rails, authentication, devise
yii2-jwt-user
JWT (JSON Web Token) User component for Yii 2
Stars: ✭ 16 (-95.74%)
Mutual labels:  auth, token
horse-jwt
Middleware for JWT in HORSE
Stars: ✭ 39 (-89.63%)
Mutual labels:  auth, token
auth-flow-react-apollo-saga
Full stack login/register flow with React, Apollo, Redux, Redux-saga and MongoDB.
Stars: ✭ 22 (-94.15%)
Mutual labels:  auth, token
restify-jwt-community
Restify middleware that validates a JsonWebToken
Stars: ✭ 24 (-93.62%)
Mutual labels:  auth, token
Authenticationviewcontroller
A simple to use, standard interface for authenticating to oauth 2.0 protected endpoints via SFSafariViewController.
Stars: ✭ 254 (-32.45%)
Mutual labels:  authentication, oauth
token-master
Minimal and Simple user management for Ruby and Rails applications.
Stars: ✭ 18 (-95.21%)
Mutual labels:  devise, token
Sapper Ecommerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, 1 command deploy to production, Open Source, MIT license. Join us as contributor ([emailΒ protected])
Stars: ✭ 289 (-23.14%)
Mutual labels:  authentication, auth
Annon.api
Configurable API gateway that acts as a reverse proxy with a plugin system.
Stars: ✭ 306 (-18.62%)
Mutual labels:  authentication, auth
supabase-ui-svelte
Supabase authentication UI for Svelte
Stars: ✭ 83 (-77.93%)
Mutual labels:  oauth, auth
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (-23.4%)
Mutual labels:  authentication, token

Angular-Token

npm version npm downloads Build Status Angular Style Guide

πŸ”‘ Token based authentication service for Angular with interceptor and multi-user support. Works best with the devise token auth gem for Rails.

πŸ‘‹ This library has been renamed to Angular-Token! Please follow the migration guide.


Quick Links


Install

  1. Set up a Rails with Devise Token Auth

  2. Install Angular-Token via NPM with

    npm install angular-token
    
  3. Import and add AngularTokenModule to your main module and call the 'forRoot' function with the config. Make sure you have HttpClientModule imported too.

    import { AngularTokenModule } from 'angular-token';
    
    @NgModule({
        imports: [
            ...,
            HttpClientModule,
            AngularTokenModule.forRoot({
              ...
            })
        ],
        declarations: [ ... ],
        bootstrap:    [ ... ]
    })
    
  4. (Maybe Optional) Fix injection context runtime error After installing this package, if you get an Error: inject() must be called from an injection context when running your app, add the following to your typescript path config in the tsconfig[.app].json file:

    "paths": {
      "@angular/*": [ "./node_modules/@angular/*" ]
    }
    

Use

  1. Register your user

    constructor(private tokenService: AngularTokenService) { }
    
    this.tokenService.registerAccount({
        login:                '[email protected]',
        password:             'secretPassword',
        passwordConfirmation: 'secretPassword'
    }).subscribe(
        res =>      console.log(res),
        error =>    console.log(error)
    );
    
  2. Sign in your user

    constructor(private tokenService: AngularTokenService) { }
    
    this.tokenService.signIn({
        login:    '[email protected]',
        password: 'secretPassword'
    }).subscribe(
        res =>      console.log(res),
        error =>    console.log(error)
    );
    
  3. Now you can use HttpClient to access private resources

    constructor(http: HttpClient) { }
    
    this.http.get('private_resource').subscribe(
        res =>      console.log(res),
        error =>    console.log(error)
    );
    

Contributors


Jan-Philipp Riethmacher

Arjen Brandenburgh

License

The MIT License (see the LICENSE file for the full text)

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].