oz-login
v0.2.1
Published
install using `npm install oz-login`
Downloads
2
Readme
react login module
install
install using npm install oz-login
usage
In a react app, use the OzLogin components:
import OzLogin from "oz-login";
<OzLogin url={process.env.USER_API_URL}
onSuccess={(data) => {
localStorage.setItem("token_", data.token);
localStorage.setItem("user_", JSON.stringify(data.user));
window.location.href = "/"
}}
/>
css
.login {
margin-top: calc(50vh - 173px);
max-width: 400px;
margin-left: calc(50vw - 207px);
border-radius: 15px;
border: solid;
}
.login-button {
padding-top: 20px;
text-align: center;
padding-bottom: 15px;
}