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

Fix digits not being optional #78

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Fix digits not being optional #78

merged 1 commit into from
Dec 28, 2023

Conversation

Toreno96
Copy link
Collaborator

Fixes #77.

Fixes #77.

* * *

According to the
https://github.com/google/google-authenticator/wiki/Key-Uri-Format#digits,
`digits` parameter should be **optional**. It is not, e.g. after using
this URI:

```
otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example
```

The application raises this error:

```
[2023-12-22 18:36:00,369] DEBUG:otp:352: 1 validation error for Uri
schema_ -> TOTPUriSchema -> parameters -> digits
  field required (type=value_error.missing)
Usage: otp add uri [OPTIONS] ALIAS
Try 'otp add uri -h' for help.

Error: invalid URI
```
@Toreno96 Toreno96 merged commit 3f7df82 into master Dec 28, 2023
2 checks passed
@Toreno96 Toreno96 deleted the issue-77 branch December 28, 2023 00:35
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.

digits is not optional
1 participant