Skip to content

Commit

Permalink
feat: Add example code for login callback
Browse files Browse the repository at this point in the history
  • Loading branch information
hkp22 committed Nov 3, 2024
1 parent 1235bda commit 9abfa83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions playground/pages/auth/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const { login } = useSanctum();
async function submit() {
await login(form.value);
// // In Case of 2FA feature.
// await login<{ two_factor: boolean }>(form.value, {}, async (response) => {
// if (response.two_factor) {
// return await navigateTo(`/2fa`);
// }
// return await navigateTo(`/dashboard`);
// });
}
</script>

Expand Down

0 comments on commit 9abfa83

Please sign in to comment.