Skip to content

Commit

Permalink
fix: login redirect debug
Browse files Browse the repository at this point in the history
  • Loading branch information
debendraoli committed Nov 26, 2024
1 parent 42525f5 commit 9330586
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/(authentication)/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ export default function Login({ callbackUrl }: { callbackUrl: string }) {
const router = useRouter()
const dict = useDictionary()

const login = async (e: React.FormEvent<HTMLFormElement>) => {
const login = async (formData: FormData) => {
setSubmitting(true)
setError('')
try {
const formData = new FormData(e.currentTarget)
const res = await signIn('credentials', {
email: formData.get('email'),
username: formData.get('username'),
password: formData.get('password'),
redirect: false,
callbackUrl,
Expand Down

0 comments on commit 9330586

Please sign in to comment.