sf_auth_client

1.1.2 • Public • Published

sf_auth_client

React component, pure function

Install

Install with Npm

$ npm install sf_auth_client 

Versions

Current Version

1.1.2

Usage

Import pakage

import Auth from 'sf_auth_client'

Feature in this version

***Using as components react

  • Login form:
	<Auth.Login_Form 
	submitUrl = "@link_api_login"
	callbackUrl = "http://link" 
	 />
  • Signup form:
	<Auth.Signup_Form 
	submitUrl = "link_api_login"
	callbackUrl = "http://link" 
	 />

***Using js function

  • Set token was saved in localStorage to request's header for authenticaticate resquest on server
	Auth.setAuthorizationToken();
  • Get Profile
	Auth.getProfile('api/getProfileByToken');

method return a object: result = { isSuccess, id, type }

  • Get type user
Auth.getTypeUser();

-Get token

Auth.getToken();

/sf_auth_client/

    Package Sidebar

    Install

    npm i sf_auth_client

    Weekly Downloads

    0

    Version

    1.1.2

    License

    ISC

    Last publish

    Collaborators

    • hdlinhit95