Skip to content

Commit

Permalink
fix(delete): remove session cookie when delete account (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilielr authored Feb 12, 2025
1 parent cb3202e commit fcc56e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tavla/app/(admin)/components/DeleteAccount/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
removeUserFromOrg,
} from 'app/(admin)/utils/firebase'
import { getFormFeedbackForError } from 'app/(admin)/utils'
import { redirect } from 'next/navigation'
import * as Sentry from '@sentry/nextjs'
import { auth } from 'firebase-admin'
import { getUserFromSessionCookie } from 'app/(admin)/utils/server'
import { logout } from '../Login/actions'

export async function deleteAccount(data: FormData) {
const user = await getUserFromSessionCookie()
Expand Down Expand Up @@ -41,7 +41,7 @@ export async function deleteAccount(data: FormData) {
})
return getFormFeedbackForError('firebase/general')
}
redirect('/')
await logout()
}

async function deleteOrgsAndBoardsWithSoleMember() {
Expand Down

0 comments on commit fcc56e1

Please sign in to comment.