Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
divyam234 committed Dec 23, 2023
1 parent 67cc414 commit c473d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function getAuthUser(c: Context): Promise<NextAuthUser | null> {
export function verifyAuth(): MiddlewareHandler {
return async (c, next) => {
const authUser = await getAuthUser(c)
const isAuth = !!authUser?.token
const isAuth = (!!authUser?.token) || (!!authUser?.user)
if (!isAuth) {
const res = new Response('Unauthorized', {
status: 401,
Expand Down

0 comments on commit c473d0e

Please sign in to comment.