Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sf_authentication_client

hdlinhit9520ISC1.1.2

Libary_SmartFun

readme

sf_authentication_client

React component, pure function

Install

Install with Npm

$ npm install sf_authentication_client 

Versions

Current Version

1.1.2

Usage

Import pakage

import Auth from 'sf_authentication_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{id, username}
    Auth.getProfile();