Successful signup also calls login right after
This commit is contained in:
@@ -17,6 +17,7 @@ async function onSubmit() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
await auth.signup({ username: username.value, email: email.value, password: password.value })
|
await auth.signup({ username: username.value, email: email.value, password: password.value })
|
||||||
|
await auth.login({ email: email.value, password: password.value})
|
||||||
router.push('/')
|
router.push('/')
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
error.value = e.messages || ['Signup failed']
|
error.value = e.messages || ['Signup failed']
|
||||||
|
|||||||
Reference in New Issue
Block a user