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

Failed to add Microsoft 365 QR Code because colon character in account field #134

Closed
abelmferreira opened this issue Oct 21, 2022 · 5 comments
Labels
enhancement fixed The issue is fixed (in a coming release)
Milestone

Comments

@abelmferreira
Copy link

abelmferreira commented Oct 21, 2022

Describe the bug
The Test feature returns an error in the advanced form when the account field contains a colon.
The qrcode generated by Microsoft also is not accepted by upload feature.
Removing the colon, the generated otp is not accpeted by Microsoft validation.
Related to issue #45

To Reproduce
Steps to reproduce the behavior:

Go to /account/create
Field the form with Account or Service with a colon
Click on Test
See error

Removing the colon, the validation step with the generated otp with Microsoft fail.

Example QR Code text generated by Microsoft
otpauth://totp/ORGANIZATION:account@domain.com?secret=xxxxxxFAKExxxxx&issuer=Microsoft

Expected behavior
An OTP password should be displayed and validation success

Additional context
Version 3.4.0 using docker hub image 2fauth/2fauth:3.4.0
Same error on version 3.3.3

Screenshots
Screenshot_68
Screenshot_72
Screenshot_71

@Bubka
Copy link
Owner

Bubka commented Oct 21, 2022

Regarding the validation step failure, please set the Secret field as base32 format and try again.

@Bubka
Copy link
Owner

Bubka commented Oct 21, 2022

Another point: unless specified (like in the given Microsoft example), algorithm is SHA1. You screen shows a SHA256 config.

@abelmferreira
Copy link
Author

Thanks!
but i need remove the organization a colon parts from account field?

the print is with sha256, but I tested all the algorithms, including sha1, removing the organization and colon from account and validation fail.

the secret is a smaller string, like this generated now: "7yfnlbbyt2ldtsnw"
when i choose base32 i got this error: "The secret must be a base32 encoded string."

@Bubka
Copy link
Owner

Bubka commented Oct 21, 2022

Thanks!

but i need remove the organization a colon parts from account field?

You can, this has no impact on generated password.

the secret is a smaller string, like this generated now: "7yfnlbbyt2ldtsnw"

when i choose base32 i got this error: "The secret must be a base32 encoded string."

Simply uppercase the string, it should works.

@abelmferreira
Copy link
Author

That's it!!!!! its working now!
Thanks! Your project is fantastic and your quick response was amazing!

For future searches
To manual add a Microsoft Authentication OTP

  • In account field just put the e-mail address removing the organizarion and colon;
  • Choose TOTP;
  • Choose SHA1 algorithms;
  • Select base32 secret type and put the given string in uppercase;

@Bubka Bubka moved this to Todo in 2FAuth backlog Oct 23, 2022
@Bubka Bubka moved this from Todo to Done in 2FAuth backlog Jul 6, 2023
@Bubka Bubka added this to the v4.1.0 milestone Jul 6, 2023
@Bubka Bubka added the fixed The issue is fixed (in a coming release) label Jul 6, 2023
@Bubka Bubka moved this from Done to Released in 2FAuth backlog Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed The issue is fixed (in a coming release)
Projects
Status: Released
Development

No branches or pull requests

2 participants