Skip to content

Commit

Permalink
fix: worflow link
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Jan 18, 2023
1 parent 645a2c6 commit d1dd839
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A Nuxt 3 module to handle authentication
## Features

- Email/password authentication
- Email verification & password reset flow
- Oauth login (Google, Github ...)
- Route middleware auth protection
- Database agnostic (Prisma based)
Expand Down Expand Up @@ -37,6 +38,7 @@ export default defineNuxtConfig({
refreshTokenMaxAge: // Refresh token's cookie maxAge

oauth: { // Oauth providers's config (optional)
//...
google: {
clientId:
clientSecret:
Expand All @@ -45,6 +47,7 @@ export default defineNuxtConfig({
tokenUrl:
userUrl:
},
//...
},

smtp: { // SMTP server's config (required)
Expand Down Expand Up @@ -153,7 +156,7 @@ definePageMeta({ middleware: "guest" }); // Redirects to home path when loggedIn

<br>

For auto refresh of access token you can use `prefetch` method
For handling refresh of access token you can use `prefetch` method

```javascript
const { prefetch, useAccessToken } = useAuth();
Expand All @@ -171,7 +174,7 @@ const { data, error } = await useFetch("/api/protected", {

## Appendix

![workflow](https://github.com/becem-gharbi/nuxt-auth/blob/alpha/workflow.png)
![workflow](https://github.com/becem-gharbi/nuxt-auth/blob/beta/workflow.png)

## Development

Expand Down

0 comments on commit d1dd839

Please sign in to comment.