Skip to content

fix(api): Remove redundant "totp" and "webauthn" fields from certain schemas - #1169

Open
PilkeySEK wants to merge 5 commits into
fluxerapp:mainfrom
PilkeySEK:redundant-fields
Open

fix(api): Remove redundant "totp" and "webauthn" fields from certain schemas#1169
PilkeySEK wants to merge 5 commits into
fluxerapp:mainfrom
PilkeySEK:redundant-fields

Conversation

@PilkeySEK

Copy link
Copy Markdown
Contributor

Summary

  • What changed:
    • Added a AuthMfaMethod enum which has "totp" and "webauthn" as possible values
    • Modified the following schemas/interfaces/types:
      • LoginMfaResult in fluxer_api/src/api/auth/AuthLogin.ts
      • ResetPasswordResult in fluxer_api/src/api/auth/AuthPassword.ts
      • LoginMfaResponse and LoginResponse in fluxer_api/src/api/auth/tests/AuthTestUtils.ts
      • MfaLoginResponse in fluxer_app/src/features/auth/commands/AuthenticationCommands.ts
      • AuthMfaRequiredResponse in packages/schema/src/domains/auth/AuthSchemas.ts
  • Why it is correct: The same information is already in allowed_methods , which lists totp and webauthn if they are available.
  • Risk: I could have missed a location where this is missing (though unlikely because typescript would usually catch it).

Verification

  • Tests run: Yes
  • Manual checks: Registration and login worked just fine.
  • Screenshots or recordings:

Checklist

  • I understand every change in this PR.
  • I can explain what it does and why it is correct.
  • I disclosed any LLM coding help below.

LLM Disclosure

  • None

@PilkeySEK

Copy link
Copy Markdown
Contributor Author

(this might have backwards-compatibility problems because all clients would need to update at once, maybe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant