How to verify password?
Is there a function that I can use to verify the password? I want the user to type the current password to confirm before changing the username.
'use server'
import { authenticatedActionClient } from '@/lib/safe-action'
import { changeUsernameSchema } from './schema'
export const changeUsername = authenticatedActionClient
.schema(changeUsernameSchema)
.action(async ({ parsedInput }) => {
const { username, password } = parsedInput
// verify password
})