-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Atinux:main' into main
- Loading branch information
Showing
16 changed files
with
1,960 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# enable TypeScript bundler module resolution - https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler | ||
experimental.typescriptBundlerResolution=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,61 @@ | ||
# Changelog | ||
|
||
|
||
## v0.0.14 | ||
|
||
[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.13...v0.0.14) | ||
|
||
### 🚀 Enhancements | ||
|
||
- Added keycloak as oauth provider ([#23](https://github.com/Atinux/nuxt-auth-utils/pull/23)) | ||
|
||
### 🏡 Chore | ||
|
||
- Test bundler module resolution ([#32](https://github.com/Atinux/nuxt-auth-utils/pull/32)) | ||
- Update deps ([9d6b258](https://github.com/Atinux/nuxt-auth-utils/commit/9d6b258)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Sébastien Chopin ([@Atinux](http://github.com/Atinux)) | ||
- Yue JIN | ||
- Daniel Roe <[email protected]> | ||
|
||
## v0.0.13 | ||
|
||
[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.12...v0.0.13) | ||
|
||
### 🏡 Chore | ||
|
||
- Rename session from verify to fetch ([10694e9](https://github.com/Atinux/nuxt-auth-utils/commit/10694e9)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Sébastien Chopin ([@Atinux](http://github.com/Atinux)) | ||
|
||
## v0.0.12 | ||
|
||
[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.11...v0.0.12) | ||
|
||
### 🩹 Fixes | ||
|
||
- Correct arguments for hooks ([6e0193e](https://github.com/Atinux/nuxt-auth-utils/commit/6e0193e)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Sébastien Chopin ([@Atinux](http://github.com/Atinux)) | ||
|
||
## v0.0.11 | ||
|
||
[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.10...v0.0.11) | ||
|
||
### 🚀 Enhancements | ||
|
||
- Add sessionHooks to extend user sessions ([c470319](https://github.com/Atinux/nuxt-auth-utils/commit/c470319)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Sébastien Chopin ([@Atinux](http://github.com/Atinux)) | ||
|
||
## v0.0.10 | ||
|
||
[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.9...v0.0.10) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default defineNitroPlugin(() => { | ||
sessionHooks.hook('fetch', async (session) => { | ||
// Extend User Session | ||
// Or throw createError({ ... }) if session is invalid | ||
session.extended = { | ||
fromHooks: true | ||
} | ||
}) | ||
|
||
sessionHooks.hook('clear', async (session) => { | ||
// Log that user logged out | ||
console.log('User logged out') | ||
}) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default oauth.keycloakEventHandler({ | ||
async onSuccess(event, { user }) { | ||
await setUserSession(event, { | ||
user: { | ||
keycloak: user, | ||
}, | ||
loggedInAt: Date.now(), | ||
}) | ||
|
||
return sendRedirect(event, '/') | ||
}, | ||
}) |
Oops, something went wrong.