@devhero/devauth-react
v0.5.5-d
Published
[Register project in console](https://console.devauth.tech)
Downloads
30
Readme
DevAuth React
Take it easy !
Client-Side with Context
import { DevAuthProvider, initializeDevAuth } from "@devhero/devauth-react"
const devauth = initializeDevAuth({
projectUrl: "******",
projectName: "******",
projectKey: "******",
})
<DevAuthProvider app={devauth}>
....
</DevAuthProvider>
useDevAuth():
import { useDevAuth } from "@devhero/devauth-react"
const {
signInWithUsernameAndPassword,
getIsLoggedIn,
getToken,
logout
} = useDevAuth()
Server-Side with Context
import { getServerSideDevAuth } from "@devhero/devauth-react"
const {
isValid,
getIsLoggedIn,
getToken
} = getServerSideDevAuth(devauth, context); // getServerSideDevAuth(devauth, { req });
License
MIT
Free Software, Hell Yeah!