0.0.13 • Published 9 years ago
sf_linh v0.0.13
sf_authentication_client
React component, pure function
Install
Install with Npm
$ npm install sf_authentication_client Versions
Current Version
1.0.4Usage
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 = "link" 
	 />***Using js function
- Set token was savedin localStorage toheader in requestfor authenticaticate resquest on server
	var token = localStorage.getItem("token_auth");
	Auth.setAuthorizationToken(token);Note: 'token_auth' is Item's name in localStorage where token was saved