Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/runtime/server/lib/oauth/auth0.ts
  • Loading branch information
Azurency committed Nov 27, 2023
2 parents 915eef6 + 79f7ce7 commit 160cd69
Show file tree
Hide file tree
Showing 18 changed files with 1,846 additions and 271 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
# Changelog


## v0.0.8

[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.7...v0.0.8)

### 🩹 Fixes

- Avoid infinite loop with latest Nuxt ([93b949d](https://github.com/Atinux/nuxt-auth-utils/commit/93b949d))

### 🏡 Chore

- **playground:** Better with right title ([97a3ad3](https://github.com/Atinux/nuxt-auth-utils/commit/97a3ad3))

### ❤️ Contributors

- Sébastien Chopin ([@Atinux](http://github.com/Atinux))

## v0.0.7

[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.6...v0.0.7)

### 🩹 Fixes

- **oauth:** Add generic OAuthConfig type ([#18](https://github.com/Atinux/nuxt-auth-utils/pull/18))

### 📖 Documentation

- Use consistent reference to module ([13daa78](https://github.com/Atinux/nuxt-auth-utils/commit/13daa78))

### 🏡 Chore

- Add SameSite=lax ([1b296e2](https://github.com/Atinux/nuxt-auth-utils/commit/1b296e2))

### ❤️ Contributors

- Sigve Hansen ([@sifferhans](http://github.com/sifferhans))
- Daniel Roe <daniel@roe.dev>
- Sébastien Chopin ([@Atinux](http://github.com/Atinux))

## v0.0.6

[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.5...v0.0.6)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ export default defineNuxtConfig({
NUXT_SESSION_PASSWORD=password-with-at-least-32-characters
```

Nuxt Auth Core can generate one for you when running Nuxt in development the first time when no `NUXT_SESSION_PASSWORD` is set.
Nuxt Auth Utils can generate one for you when running Nuxt in development the first time when no `NUXT_SESSION_PASSWORD` is set.

4. That's it! You can now add authentication to your Nuxt app ✨

## Vue Composables

Nuxt Neo automatically add some plugins to fetch the current user session to let you access it from your Vue components.
Nuxt Auth Utils automatically adds some plugins to fetch the current user session to let you access it from your Vue components.

### User Session

Expand Down Expand Up @@ -108,14 +108,15 @@ await clearUserSession(event)
const session = await requireUserSession(event)
```

You can define the type for your user session by creating a type declaration file (for example, `auth.d.ts`) in your project:
You can define the type for your user session by creating a type declaration file (for example, `auth.d.ts`) in your project to augment the `UserSession` type:

```ts
declare module '#auth-utils' {
interface UserSession {
// define the type here
}
}
export {}
```

### OAuth Event Handlers
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-auth-utils",
"version": "0.0.6",
"version": "0.0.8",
"description": "Minimalist Auth module for Nuxt with SSR",
"repository": "Atinux/nuxt-auth-utils",
"license": "MIT",
Expand Down Expand Up @@ -30,25 +30,25 @@
"test:watch": "vitest watch"
},
"dependencies": {
"@nuxt/kit": "^3.8.1",
"@nuxt/kit": "^3.8.2",
"defu": "^6.1.3",
"ofetch": "^1.3.3",
"ohash": "^1.1.3"
},
"devDependencies": {
"@iconify-json/simple-icons": "^1.1.78",
"@iconify-json/simple-icons": "^1.1.79",
"@nuxt/devtools": "latest",
"@nuxt/eslint-config": "^0.2.0",
"@nuxt/module-builder": "^0.5.4",
"@nuxt/schema": "^3.8.1",
"@nuxt/schema": "^3.8.2",
"@nuxt/test-utils": "^3.8.1",
"@nuxt/ui": "^2.10.0",
"@nuxt/ui-pro": "^0.4.2",
"@types/node": "^20.9.0",
"@types/node": "^20.9.3",
"changelogen": "^0.5.5",
"eslint": "^8.53.0",
"nuxt": "^3.8.1",
"typescript": "^5.2.2",
"eslint": "^8.54.0",
"nuxt": "^3.8.2",
"typescript": "^5.3.2",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.22"
}
Expand Down
3 changes: 3 additions & 0 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const providers = computed(() => [

<template>
<UHeader>
<template #logo>
Nuxt Auth Utils
</template>
<template #right>
<UDropdown :items="[providers]">
<UButton
Expand Down
2 changes: 2 additions & 0 deletions playground/auth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ declare module '#auth-utils' {
loggedInAt: number
}
}

export {}
Loading

0 comments on commit 160cd69

Please sign in to comment.