Getting Started with AureAuth
This project was bootstrapped with Create React App.
This packagae will allow you to sign up or sign in any new or existing user to your app.
how to install
npm - @marjara/fireauth
usage and example
import React, {Component} from 'react' import Login from '@marjara/fireauth/dist/'
class App extends Component { state={ isAuthenticated:false }
render(){
const webAPI =[you application AP from firebase console];
const restAPI={
signUp:'https://identitytoolkit.googleapis.com/v1/accounts:signUp?key='+webAPI,
login:'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key='+webAPI,
verify:'https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key='+webAPI,
verifyOK:'https://identitytoolkit.googleapis.com/v1/accounts:update?key='+webAPI,
}
const authHandler=(val)=>{
this.setState({isAuthenticated:val.isAuthenticated})
}
if (!this.state.isAuthenticated){
return <Login restAPI = {restAPI}
onAuth={(val)=>{authHandler(val)}} />
}
### val variable will return the tokenid, display name and the email id and other data objects from teh firebase API
return(
<div> welcom to app </div>
)
}
}
export default App;