-
-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stages/identification: add captcha to identification stage (#11711)
* add captcha to identification stage * simplify component invocations * fail fast on `onTokenChange` default behavior * reword docs * rename `token` to `captcha_token` in Identification stage contexts (In Captcha stage contexts the name `token` seems well-scoped.) * use `nothing` instead of ``` html`` ``` * remove rendered Captcha component from document flow on Identification stages Note: this doesn't remove the captcha itself, if interactive, only the loading indicator. * add invisible requirement to captcha on Identification stage * stylize docs * add friendlier error messages to Captcha stage * fix tests * make captcha error messages even friendlier * add test case to retriable captcha * use default Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
- Loading branch information
1 parent
b7cccf5
commit 9ee0ba1
Showing
13 changed files
with
363 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
authentik/stages/identification/migrations/0015_identificationstage_captcha_stage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 5.0.8 on 2024-08-29 11:31 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("authentik_stages_captcha", "0003_captchastage_error_on_invalid_score_and_more"), | ||
("authentik_stages_identification", "0014_identificationstage_pretend"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="identificationstage", | ||
name="captcha_stage", | ||
field=models.ForeignKey( | ||
default=None, | ||
help_text="When set, adds functionality exactly like a Captcha stage, but baked into the Identification stage.", | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="authentik_stages_captcha.captchastage", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.