UNPKG

sf_authentication_client

Version:

Libary_SmartFun

62 lines (46 loc) 892 B
sf_authentication_client ============== React component, pure function Install ============== #### Install with Npm ```sh $ npm install sf_authentication_client ``` Versions ============== Current Version ```sh 1.1.2 ``` Usage ============== #### Import pakage ```sh import Auth from 'sf_authentication_client' ``` Feature in this version ***Using as `components react` - Login form: ```sh <Auth.Login_Form submitUrl = "@link_api_login" callbackUrl = "http://link" /> ``` - Signup form: ```sh <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 ```sh Auth.setAuthorizationToken(); ``` - Get Profile{id, username} ```sh Auth.getProfile(); ```