File tree Expand file tree Collapse file tree 11 files changed +1170
-2560
lines changed Expand file tree Collapse file tree 11 files changed +1170
-2560
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33
4+ ## v0.0.10
5+
6+ [ compare changes] ( https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.9...v0.0.10 )
7+
8+ ### 🚀 Enhancements
9+
10+ - Added linkedIn auth provider ([ #13 ] ( https://github.com/Atinux/nuxt-auth-utils/pull/13 ) )
11+
12+ ### 🩹 Fixes
13+
14+ - Add audience to auth0 runtime config types ([ #27 ] ( https://github.com/Atinux/nuxt-auth-utils/pull/27 ) )
15+
16+ ### 📖 Documentation
17+
18+ - Add LinkedIn in providers ([ c9b9925] ( https://github.com/Atinux/nuxt-auth-utils/commit/c9b9925 ) )
19+
20+ ### 🏡 Chore
21+
22+ - Update deps ([ bb3a510] ( https://github.com/Atinux/nuxt-auth-utils/commit/bb3a510 ) )
23+
24+ ### ❤️ Contributors
25+
26+ - Sébastien Chopin ([ @Atinux ] ( http://github.com/Atinux ) )
27+ - José Manuel Madriaza Caravia
28+ - H+ < serdar@justserdar.dev >
29+
430## v0.0.9
531
632[ compare changes] ( https://github.com/Atinux/nuxt-auth-utils/compare/v0.0.8...v0.0.9 )
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ It can also be set using environment variables:
154154- Discord
155155- GitHub
156156- Google
157+ - LinkedIn
157158- Microsoft
158159- Spotify
159160- Twitch
Original file line number Diff line number Diff line change 11{
22 "name" : " nuxt-auth-utils" ,
3- "version" : " 0.0.9 " ,
3+ "version" : " 0.0.10 " ,
44 "description" : " Minimalist Auth module for Nuxt with SSR" ,
55 "repository" : " Atinux/nuxt-auth-utils" ,
66 "license" : " MIT" ,
3636 "ohash" : " ^1.1.3"
3737 },
3838 "devDependencies" : {
39- "@iconify-json/simple-icons" : " ^1.1.79 " ,
39+ "@iconify-json/simple-icons" : " ^1.1.82 " ,
4040 "@nuxt/devtools" : " latest" ,
4141 "@nuxt/eslint-config" : " ^0.2.0" ,
4242 "@nuxt/module-builder" : " ^0.5.4" ,
4343 "@nuxt/schema" : " ^3.8.2" ,
4444 "@nuxt/test-utils" : " ^3.8.1" ,
45- "@nuxt/ui" : " ^2.10 .0" ,
46- "@nuxt/ui-pro" : " ^0.4.2 " ,
47- "@types/node" : " ^20.9.3 " ,
45+ "@nuxt/ui" : " ^2.11 .0" ,
46+ "@nuxt/ui-pro" : " ^0.5.0 " ,
47+ "@types/node" : " ^20.10.4 " ,
4848 "changelogen" : " ^0.5.5" ,
49- "eslint" : " ^8.54 .0" ,
49+ "eslint" : " ^8.55 .0" ,
5050 "nuxt" : " ^3.8.2" ,
51- "typescript" : " ^5.3.2 " ,
52- "vitest" : " ^0.34.6 " ,
53- "vue-tsc" : " ^1.8.22 "
51+ "typescript" : " ^5.3.3 " ,
52+ "vitest" : " ^1.0.2 " ,
53+ "vue-tsc" : " ^1.8.25 "
5454 }
5555}
Original file line number Diff line number Diff line change @@ -24,4 +24,7 @@ NUXT_OAUTH_DISCORD_CLIENT_ID=
2424NUXT_OAUTH_DISCORD_CLIENT_SECRET =
2525# Battle.net OAuth
2626NUXT_OAUTH_BATTLEDOTNET_CLIENT_ID =
27- NUXT_OAUTH_BATTLEDOTNET_CLIENT_SECRET =
27+ NUXT_OAUTH_BATTLEDOTNET_CLIENT_SECRET =
28+ # LinkedIn
29+ NUXT_OAUTH_LINKEDIN_CLIENT_ID =
30+ NUXT_OAUTH_LINKEDIN_CLIENT_SECRET =
Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ const providers = computed(() => [
4949 to: ' /auth/microsoft' ,
5050 disabled: Boolean (user .value ?.microsoft ),
5151 icon: ' i-simple-icons-microsoft' ,
52+ },
53+ {
54+ label: user .value ?.linkedin ?.email || ' LinkedIn' ,
55+ to: ' /auth/linkedin' ,
56+ disabled: Boolean (user .value ?.linkedin ),
57+ icon: ' i-simple-icons-linkedin' ,
5258 }
5359
5460].map (p => ({
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ declare module '#auth-utils' {
99 microsoft ?: any ;
1010 discord ?: any
1111 battledotnet ?: any
12+ linkedin ?: any
1213 }
1314 loggedInAt : number
1415 }
Original file line number Diff line number Diff line change 1+ export default oauth . linkedinEventHandler ( {
2+ config : {
3+ emailRequired : true
4+ } ,
5+ async onSuccess ( event , { user } ) {
6+ await setUserSession ( event , {
7+ user : {
8+ linkedin : user ,
9+ } ,
10+ loggedInAt : Date . now ( )
11+ } )
12+
13+ return sendRedirect ( event , '/' )
14+ }
15+ } )
You can’t perform that action at this time.
0 commit comments