@devhero/vue-devauth
v0.0.5
Published
## Installation [Register project in console](https://console.devauth.tech)
Downloads
3
Readme
Vue DevAuth
Take it easy !
Installation
Client-Side with Context
initialize
const auth = useDevAuth({
projectUrl: "******",
projectName: "******",
projectKey: "******",
})
signin
const token = await auth.signInWithUsernameAndPassword(username, password)
try {
if (!auth.isLoggedIn) {
router.push("/") // go to login page
return
}
if (auth.isTokenExpired) {
await auth.refresh()
}
const payload = await auth.verify()
} catch (err) {
...
}
logout
auth.logout()
License
MIT
Free Software, Hell Yeah!