Skip to content

Instantly share code, notes, and snippets.

@mrworf
Last active June 10, 2025 23:15
Show Gist options
  • Select an option

  • Save mrworf/27a8e688e9cb3b19b6db9a28f342ace0 to your computer and use it in GitHub Desktop.

Select an option

Save mrworf/27a8e688e9cb3b19b6db9a28f342ace0 to your computer and use it in GitHub Desktop.

Revisions

  1. mrworf revised this gist Jun 10, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion remove_webauthn.py
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@
    import authentik.stages.authenticator_webauthn.models as webauthn_models
    from authentik.core.models import User

    user = User.objects.get(username="admin")
    user = User.objects.get(username="akadmin")
    totp_models.TOTPDevice.objects.filter(user=user).delete()
    webauthn_models.WebAuthnDevice.objects.filter(user=user).delete()
  2. mrworf renamed this gist Jun 10, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. mrworf created this gist Jun 10, 2025.
    9 changes: 9 additions & 0 deletions hack.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Run the following code via "ak shell"
    #
    import authentik.stages.authenticator_totp.models as totp_models
    import authentik.stages.authenticator_webauthn.models as webauthn_models
    from authentik.core.models import User

    user = User.objects.get(username="admin")
    totp_models.TOTPDevice.objects.filter(user=user).delete()
    webauthn_models.WebAuthnDevice.objects.filter(user=user).delete()