Skip to content

Commit

Permalink
fix: weird update password bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benfurber committed Feb 26, 2025
1 parent 58a1c14 commit 33dfa71
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/routes/_.update-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,9 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
return Response.json({ error })
}

const {
data: { user },
} = await client.auth.getUser()

if (user) {
return Response.json({}, { headers })
}

const code = url.searchParams.get('code')
if (code) {
const result = await client.auth.exchangeCodeForSession(
url.searchParams.get('code') as string,
)
const result = await client.auth.exchangeCodeForSession(code)

if (result.error) {
return Response.json(
Expand Down

0 comments on commit 33dfa71

Please sign in to comment.