Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Sep 5, 2023
1 parent 4237fed commit c0f759e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 46 deletions.
3 changes: 2 additions & 1 deletion components/global/LoginCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async function signInWithPassword() {
loading.value = true
const { error, url } = await signIn('credentials', {
...signInModel.value,
email: signInModel.value.email,
password: signInModel.value.password,
redirect: false,
})
Expand Down
10 changes: 5 additions & 5 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ export default defineNuxtConfig({
},
},
auth: {
provider: {
type: 'authjs',
},
globalAppMiddleware: {
isEnabled: true,
isEnabled: true,
enableGlobalAppMiddleware: true,
globalMiddlewareOptions: {
allow404WithoutAuth: true,
addDefaultCallbackUrl: true,
},
},
build: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@nuxtjs/color-mode": "^3.3.0",
"@pinia-plugin-persistedstate/nuxt": "^1.1.1",
"@pinia/nuxt": "^0.4.11",
"@sidebase/nuxt-auth": "^0.6.0-beta.5",
"@sidebase/nuxt-auth": "^0.5.0",
"@types/async": "^3.2.20",
"@types/jsdom": "^21.1.2",
"@types/qrcode": "^1.5.1",
Expand Down
42 changes: 4 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/api/auth/[...].ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Credentials {
}

export default NuxtAuthHandler({
secret: process.env.AUTH_SECRET || 'chaoxing-sing-123',
secret: process.env.AUTH_SECRET || 'chaoxing-sing',
callbacks: {
jwt: async ({ token, user }) => {
const isSignIn = !!user
Expand Down
File renamed without changes.

1 comment on commit c0f759e

@vercel
Copy link

@vercel vercel bot commented on c0f759e Sep 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chaoxing-sign – ./

chaoxing-sign-kuizuo1.vercel.app
cx-sign.vercel.app
chaoxing-sign-git-main-kuizuo1.vercel.app

Please sign in to comment.