Skip to content

Add Two Factor Authentication for Vue Starter Kit #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Aug 19, 2025

This MR adds Two-Factor Authentication (2FA) functionality to the Vue Starter Kit using Laravel Fortify's built-in support for 2FA

🔒 Backend Changes

We are now leveraging Fortify for handling two-factor authentication. Since Fortify provides additional security features out of the box, this MR also replaces our custom implementation of the password confirmation page with Fortify’s native confirm password functionality.

Previously: Custom password confirmation
Now: Native Fortify confirm-password implementation

🖥️ Frontend/UI Updates

The UI has been updated to handle all the two-factor settings based on Fortify's configuration. The following Fortify features are enabled:

Features::twoFactorAuthentication([
    'confirm' => true,
    'confirmPassword' => true,
    // 'window' => 0
]),

📹 Demo

Here is the video demo for this feature:

…e component and simplify implementation logic (#149)
…nhance state management, and optimize TwoFactor UI components
…improve recovery codes visibility toggle, and standardize spacing
…s with Inertia assertions, and improve naming consistency
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pushpak1300 why are these migrations not in the original create_users_table migration

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, is there a reason you made this migration separate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two-factor authentication can be made an optional feature. Instead of modifying the file, they can simply revert the migration and delete it.

@pushpak1300 pushpak1300 marked this pull request as ready for review August 20, 2025 12:38
@pushpak1300 pushpak1300 changed the title Add Two Factor Authorisation for Vue Starter Kit Add Two Factor Authentication for Vue Starter Kit Aug 20, 2025
Copy link
Contributor

@joetannenbaum joetannenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass done, let's make these updates and I'll do another round. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, is there a reason you made this migration separate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants