Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isTotpEnable to users for Passwordless Authentication Support #51

Merged
merged 12 commits into from
Jan 29, 2025

Conversation

kimitrii
Copy link
Owner

Changes Made

This PR adds a new boolean column, isTotpEnable, to the users database table. This feature allows for passwordless user creation by enabling TOTP (Time-based One-Time Password) authentication. When creating a new user, the payload can be set as follows:

{
    "name": "John Doe",
    "username": "johndoee",
    "isTotpEnable": false
}

With this new field, you can now easily determine if a user has TOTP enabled by checking the value of isTotpEnable. This eliminates the need to perform joins with the future TOTP tokens table, simplifying the query logic.
Also some tests was updated by adding the new field to it.

Changes Type

  • New feature
  • Breaking change (The creation user endpoint now requires the boolean field isTotpEnable in body payload to successful create new user)
  • Documentation update

Checklist:

  • The changes do not generate new error logs or warnings.
  • I have added tests that prove the fix or new feature works as expected.
  • Both new and existing tests pass locally.

@kimitrii kimitrii merged commit 54f62d7 into main Jan 29, 2025
3 checks passed
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.

1 participant