Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update nuxt auth #24

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nasty-lions-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3nuxt-app": patch
---

Updating version of NuxtAuth to 0.5.0
4 changes: 2 additions & 2 deletions cli/src/installers/dependencyVersionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/
export const dependencyVersionMap = {
// NextAuth.js
"@sidebase/nuxt-auth": "^0.4.1",
"next-auth": "4.18.8",
"@sidebase/nuxt-auth": "^0.5.0",
"next-auth": "4.21.1",
"@next-auth/prisma-adapter": "^1.0.5",

// Prisma
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
const { data: sessionData, status, signIn, signOut } = useSession();
const { data: sessionData, status, signIn, signOut } = useAuth();
const { $client } = useNuxtApp();

const { data: secretMessage } =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
const { data: sessionData, status, signIn, signOut } = useSession();
const { data: sessionData, status, signIn, signOut } = useAuth();
const { $client } = useNuxtApp();

const { data: secretMessage } =
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/auth/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default NuxtAuthHandler({
},
},
providers: [
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// @ts-expect-error You need to use .default here for it to work during SSR. May be fixed via Vite at some point
DiscordProvider.default({
clientId: process.env.DISCORD_CLIENT_ID,
clientSecret: process.env.DISCORD_CLIENT_SECRET,
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/auth/with-prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default NuxtAuthHandler({
},
adapter: PrismaAdapter(prisma),
providers: [
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// @ts-expect-error You need to use .default here for it to work during SSR. May be fixed via Vite at some point
DiscordProvider.default({
clientId: process.env.DISCORD_CLIENT_ID,
clientSecret: process.env.DISCORD_CLIENT_SECRET,
Expand Down
Loading