0.1.9 • Published 2 years ago

@dovision/react-ezauth v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@w2solutions/react-ezauth

react authentication helper package

Usage

const reactEzAuth = require('react-ezauth');

// TODO: DEMONSTRATE API

Overriding User Type and Roles

// AuthTypes.d.ts

import "@w2solutions/react-ezauth"

declare module "@w2solutions/react-ezauth" {
  export interface DefaultUser {
    id: string;
    username: string;
    roles: DefaultUserRole[];
    // ...
  }

  export enum DefaultUserRole {
    ADMIN = 'Admin',
    DEVELOPER = 'Developer',
    USER = 'User',
  }
}