Skip to content

Commit

Permalink
Merge branch 'main' into keycloak
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 authored Dec 8, 2023
2 parents 53a7668 + c60fde7 commit df124f3
Show file tree
Hide file tree
Showing 11 changed files with 1,169 additions and 2,559 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Changelog


## v0.0.10

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

### 🚀 Enhancements

- Added linkedIn auth provider ([#13](https://github.com/Atinux/nuxt-auth-utils/pull/13))

### 🩹 Fixes

- Add audience to auth0 runtime config types ([#27](https://github.com/Atinux/nuxt-auth-utils/pull/27))

### 📖 Documentation

- Add LinkedIn in providers ([c9b9925](https://github.com/Atinux/nuxt-auth-utils/commit/c9b9925))

### 🏡 Chore

- Update deps ([bb3a510](https://github.com/Atinux/nuxt-auth-utils/commit/bb3a510))

### ❤️ Contributors

- Sébastien Chopin ([@Atinux](http://github.com/Atinux))
- José Manuel Madriaza Caravia
- H+ <[email protected]>

## v0.0.9

[compare changes](https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.8...v0.0.9)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ It can also be set using environment variables:
- GitHub
- Google
- Keycloak
- LinkedIn
- Microsoft
- Spotify
- Twitch
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-auth-utils",
"version": "0.0.9",
"version": "0.0.10",
"description": "Minimalist Auth module for Nuxt with SSR",
"repository": "Atinux/nuxt-auth-utils",
"license": "MIT",
Expand Down Expand Up @@ -36,20 +36,20 @@
"ohash": "^1.1.3"
},
"devDependencies": {
"@iconify-json/simple-icons": "^1.1.79",
"@iconify-json/simple-icons": "^1.1.82",
"@nuxt/devtools": "latest",
"@nuxt/eslint-config": "^0.2.0",
"@nuxt/module-builder": "^0.5.4",
"@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.3",
"@nuxt/ui": "^2.11.0",
"@nuxt/ui-pro": "^0.5.0",
"@types/node": "^20.10.4",
"changelogen": "^0.5.5",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"nuxt": "^3.8.2",
"typescript": "^5.3.2",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.22"
"typescript": "^5.3.3",
"vitest": "^1.0.2",
"vue-tsc": "^1.8.25"
}
}
3 changes: 3 additions & 0 deletions playground/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ NUXT_OAUTH_KEYCLOAK_CLIENT_ID=
NUXT_OAUTH_KEYCLOAK_CLIENT_SECRET=
NUXT_OAUTH_KEYCLOAK_SERVER_URL=
NUXT_OAUTH_KEYCLOAK_REALM=
# LinkedIn
NUXT_OAUTH_LINKEDIN_CLIENT_ID=
NUXT_OAUTH_LINKEDIN_CLIENT_SECRET=
6 changes: 6 additions & 0 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ const providers = computed(() => [
to: '/auth/keycloak',
disabled: Boolean(user.value?.keycloak),
icon: 'i-simple-icons-redhat'
},
{
label: user.value?.linkedin?.email || 'LinkedIn',
to: '/auth/linkedin',
disabled: Boolean(user.value?.linkedin),
icon: 'i-simple-icons-linkedin',
}
].map(p => ({
...p,
Expand Down
1 change: 1 addition & 0 deletions playground/auth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare module '#auth-utils' {
discord?: any
battledotnet?: any
keycloak?: any
linkedin?: any
}
loggedInAt: number
}
Expand Down
15 changes: 15 additions & 0 deletions playground/server/routes/auth/linkedin.get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default oauth.linkedinEventHandler({
config: {
emailRequired: true
},
async onSuccess(event, { user }) {
await setUserSession(event, {
user: {
linkedin: user,
},
loggedInAt: Date.now()
})

return sendRedirect(event, '/')
}
})
Loading

0 comments on commit df124f3

Please sign in to comment.