Skip to content

feat: 2fa auth#1343

Open
MrWeez wants to merge 48 commits into
Ctrlpanel-gg:developmentfrom
MrWeez:feat/2fa
Open

feat: 2fa auth#1343
MrWeez wants to merge 48 commits into
Ctrlpanel-gg:developmentfrom
MrWeez:feat/2fa

Conversation

@MrWeez
Copy link
Copy Markdown
Collaborator

@MrWeez MrWeez commented May 1, 2026

Description

This PR introduces very important security feature - 2FA authentication. Users asked for this feature for a very long time, since it greatly improves security for both admins and regular users.

Implementation is very flexible and made using extensions. Any new 2FA method can be added without touching core files, just by placing 2FA method directory inside /app/Extensions/TwoFactor/.

Theme developers is able to override 2FA method provided views. For more information read app/Extensions/TwoFactor/THEMING.md

Currently it includes only default TOTP method, but more optio will be added in the feature.

It also improves UI/UX of profile page and adds support for custom views for Extensions

Closes #758


Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code quality
  • Documentation
  • Other:

Testing

Tested all possible scenarios. Enable, disable and action. All login process and related functions


Screenshots

image image image image image

AI Assistance

  • I used AI tools to assist with this contribution

Checklist

  • My PR targets the development branch
  • Commit messages follow Conventional Commits
  • Code follows PSR-12
  • I have reviewed my own code
  • I have tested all affected functionality
  • No new warnings or errors introduced

Legal

By submitting this pull request, I confirm that my contribution is made
under the terms of the project's
Contributor License Agreement
and that I have read and agree to the
Code of Conduct.

@MrWeez MrWeez linked an issue May 1, 2026 that may be closed by this pull request
@MrWeez MrWeez marked this pull request as ready for review May 1, 2026 23:58
@1day2die 1day2die requested a review from Copilot May 2, 2026 01:49

This comment was marked as outdated.

@MrWeez

This comment was marked as outdated.

This comment was marked as outdated.

@MrWeez

This comment was marked as outdated.

@MrWeez MrWeez added the High Priority Critical. Act quickly for resolution label May 2, 2026
@MrWeez MrWeez marked this pull request as draft May 2, 2026 23:56
@MrWeez MrWeez marked this pull request as ready for review May 6, 2026 19:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

themes/BlueInfinity/views/layouts/app.blade.php:40

  • Like the main layout, the BlueInfinity auth layout doesn’t include @stack('modals') / @stack('scripts') and doesn’t respect $suppressSweetAlert2. Since the new 2FA auth views extend layouts.app, this can lead to inconsistent behavior between themes (and makes it hard for extensions to inject scripts/modals consistently). Consider aligning this layout with the default theme’s layouts/app.blade.php changes (stacks + SweetAlert suppression guard).

Comment thread themes/default/views/profile/index.blade.php
Comment thread routes/web.php
Comment thread config/google2fa.php
Comment thread config/auth.php
Comment thread app/Http/Controllers/Admin/UserController.php
Comment on lines 17 to 22
content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/ctrlpanel_logo.png') }}'
property="og:image">
<title>{{ config('app.name', 'Laravel') }}</title>
<title>{{ config('app.name', 'CtrlPanel.gg') }}</title>
<link rel="icon"
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blueinfinity is fucked up. That's not the only it's problem. It's completely out-of-sync from default theme. Needs to be fixed with another PR

Comment thread app/Extensions/TwoFactor/Dummy/DummyExtension.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority Critical. Act quickly for resolution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 2FA

2 participants