@w2solutions/react-ezauth
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@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',
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @w2solutions/react-ezauth

Weekly Downloads

8

Version

0.1.8

License

MIT

Unpacked Size

29.7 kB

Total Files

46

Last publish

Collaborators

  • juhwon