Skip to content

stages/authenticator_email: Email OTP#12630

Merged
BeryJu merged 88 commits intogoauthentik:mainfrom
melizeche:feature/stage_authenticator_email
Feb 17, 2025
Merged

stages/authenticator_email: Email OTP#12630
BeryJu merged 88 commits intogoauthentik:mainfrom
melizeche:feature/stage_authenticator_email

Conversation

@melizeche
Copy link
Member

@melizeche melizeche commented Jan 10, 2025

Details

stages/authenticator_email: Add Email Authenticator Stage

Introduces a new authentication stage that enables email-based two-factor authentication. This stage:

  • Allows users to set up and verify their email for 2FA
  • Supports configurable email templates for OTP delivery
  • Integrates with existing flow and challenge system

closes #3291

Documentation PR: #12853


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@melizeche melizeche requested a review from a team as a code owner January 10, 2025 09:10
@netlify
Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 086ecda
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67b3321d41541d0008f86074

@netlify
Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 086ecda
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67b3321de649fe0008d587f1
😎 Deploy Preview https://deploy-preview-12630--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rissson rissson marked this pull request as draft January 10, 2025 17:24
@codecov
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 94.93927% with 25 lines in your changes missing coverage. Please review.

Project coverage is 87.09%. Comparing base (98f3b9a) to head (086ecda).
Report is 76 commits behind head on main.

Files with missing lines Patch % Lines
authentik/stages/authenticator_email/stage.py 86.66% 14 Missing ⚠️
authentik/lib/utils/email.py 81.48% 5 Missing ⚠️
authentik/stages/authenticator_email/models.py 96.34% 3 Missing ⚠️
authentik/stages/authenticator_validate/stage.py 84.61% 2 Missing ⚠️
authentik/stages/email/tasks.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12630      +/-   ##
==========================================
- Coverage   92.75%   87.09%   -5.67%     
==========================================
  Files         785      792       +7     
  Lines       39623    40121     +498     
==========================================
- Hits        36754    34943    -1811     
- Misses       2869     5178    +2309     
Flag Coverage Δ
e2e 48.27% <31.98%> (-0.22%) ⬇️
integration 24.51% <22.26%> (-0.03%) ⬇️
unit 84.33% <94.93%> (-6.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rissson rissson changed the title [DRAFT] stages/authenticator_email: Email OTP stages/authenticator_email: Email OTP Jan 10, 2025
@melizeche
Copy link
Member Author

@rissson I pushed the generated schema.yml and blueprints/schema.json
Is this the correct procedure?

@rissson
Copy link
Member

rissson commented Jan 16, 2025

I pushed the generated schema.yml and blueprints/schema.json Is this the correct procedure?

Yes, that's the way to go about it

@melizeche melizeche marked this pull request as ready for review January 29, 2025 12:13
@melizeche melizeche requested a review from a team as a code owner January 29, 2025 12:13
@melizeche
Copy link
Member Author

melizeche commented Feb 11, 2025

Videos

Set up
https://github.com/user-attachments/assets/61f26b3e-eed5-4311-8662-5bf18d031766

Demo user without email on their profile
https://github.com/user-attachments/assets/72369ffe-d71a-4ec0-bb9a-cb8ca0f5f36f

Demo user with email on their profile
https://github.com/user-attachments/assets/6ef9893f-8d67-4480-b96b-47e513f3b1c5

@notion-workspace
Copy link

Email OTP

Signed-off-by: Jens L. <jens@beryju.org>
Copy link
Member

@BeryJu BeryJu left a comment

Choose a reason for hiding this comment

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

Some minor last changes, otherwise LGTM

@melizeche melizeche requested a review from BeryJu February 15, 2025 02:49
melizeche and others added 3 commits February 15, 2025 00:10
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu merged commit 4ba360e into goauthentik:main Feb 17, 2025
77 of 83 checks passed
@notion-workspace
Copy link

Email OTP

kensternberg-authentik added a commit that referenced this pull request Feb 20, 2025
* main: (24 commits)
  core: add additional RBAC permission to restrict setting the superuser status on groups (#12900)
  web: bump API Client version (#13089)
  core: bump github.com/spf13/cobra from 1.8.1 to 1.9.1 (#13085)
  stages/authenticator_email: Email OTP (#12630)
  website: bump dompurify and mermaid in /website (#13077)
  web: bump dompurify and mermaid in /web (#13078)
  core: bump django-filter from 24.3 to 25.1 (#13086)
  enterprise/audit: fix diff being created when not enabled (#13084)
  core, web: update translations (#13088)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#13080)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#13081)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#13082)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#13083)
  core: bump django-storages from 1.14.4 to 1.14.5 (#13087)
  web/user: fix redirects back to user settings (#13076)
  ci: parallelize unit tests (#13036)
  core, web: update translations (#13072)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#13073)
  root: Improve debugging experience (#12961)
  core, web: update translations (#13071)
  ...
@melizeche melizeche deleted the feature/stage_authenticator_email branch February 21, 2025 18:53
@melizeche melizeche mentioned this pull request Mar 25, 2025
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.

Email OTP

3 participants