Skip to content

Commit

Permalink
fix(auth): 🐛 Production bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jan 6, 2022
1 parent 77b553a commit eea522f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/builder/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ const createOptions = (req: NextApiRequest): NextAuthOptions => ({
} else if (user) {
token.user = user
}
account?.type && (token.providerType = account?.type)
account?.type && token && (token.providerType = account?.type)
return token
},
session: async ({ session, token, user }) => {
token?.user ? (session.user = token.user as User) : (session.user = user)
return { ...session, providerType: token.providerType }
if (token?.providerType) session.providerType = token.providerType
return session
},
},
})
Expand Down

2 comments on commit eea522f

@vercel
Copy link

@vercel vercel bot commented on eea522f Jan 6, 2022

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:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
next.typebot.io

@vercel
Copy link

@vercel vercel bot commented on eea522f Jan 6, 2022

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:

viewer-v2 – ./apps/viewer

viewer-v2-typebot-io.vercel.app
viewer-v2-git-main-typebot-io.vercel.app
typebot-io.vercel.app

Please sign in to comment.