React component, pure function
$ npm install sf_auth_client
Current Version
1.1.2
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 torequest'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();