question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft Authenticator problem

See original GitHub issue

Or possibly just a lack of understanding.

I generate a key using a human-readable format as a temporary thing when testing like so:

Encoding.ASCII.GetBytes("hello")

But the TOTPs that are generated with ComputeTotp() do not match the value that the Android Microsoft Authenticator app is showing with the same secret entered manually. The phone and PC clocks are within a few ms of each other, so it’s not a skewing issue as far as I can tell.

I even tried using the Base32Encoded version of the secret as a key

The Authenticator app claims to be compatible with the RFC, so I can’t think what other variable I can change. I’m fairly certain that it uses the SHA1 hashing algorithm (and I did try all of the SHA2 variants just to be sure, and none of these worked either).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
npendlingtoncommented, May 13, 2020

Ok. I’ve resolved my issue. The secret key that is manually typed in must be the BASE32 encoded generated secret. Presumably in my testing I got a false negative by typing the key in wrong.

As soon as I produced a standard QR code to allow me to not make the human error of typing it in, it worked.

1reaction
npendlingtoncommented, May 13, 2020

@Tashaa78 I don’t I’m afraid. I expect it is an extension specific to Microsoft’s SSO though. It is something I want to get working as it happens, but I need to get a standard TOTP working to make the solution compatible with Google Authenticator.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot problems using Microsoft Authenticator
Make sure Airplane mode is off. · If you're using cellular, try switching to wifi and vice-versa. · If the VPN is active...
Read more >
Common problems with two-step verification for a work or ...
You are getting "Sorry, we're having trouble verifying your account" error message during sign-in. Microsoft may limit or block voice or SMS authentication...
Read more >
Issues with Microsoft Authenticator not popping up ...
Re: Issues with Microsoft Authenticator not popping up Approval message · 1. Restart the device and try again. · 2. Try change the...
Read more >
Common questions about the Microsoft Authenticator app
A: This is a known issue on iOS 13+. The scenario happens when you are trying to sign into an application or service,...
Read more >
Top 7 Ways to Fix Microsoft Authenticator Not Working on ...
1. Force Close and Reopen the App ... Microsoft Authenticator may act up on your phone if one of its app processes encounters...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found