-
Notifications
You must be signed in to change notification settings - Fork 1
MFA support: Token request failed: Unauthorized
#2
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
Comments
Some quick inspection of the flow from the browser. It looks like it's an OAuth bearer flow. I'm not fully familiar with it, but that looks pretty standard.
|
I've started trying to play around with https://gist.github.com/shtrom/e13b667f8181b05a53761e34a473525e Findings so far:
|
Ok, the code_verifier = ''.join([random.choice(
string.ascii_letters
+ string.digits
+ '-_')
for i in range(43)])
code_challenge = base64.urlsafe_b64encode(
hashlib.sha256(code_verifier.encode()).digest()
).strip(b'=') This now works, and I have updated the Gist, but we're facing the next problem of a Stay tuned. |
The response from { "token": <id_token> } to get the bearer token to use. |
More progress: I'm now getting an access_token... but it's then getting rejected... Gist updated. |
Ok, I got it! I have a Web application flow that allows a Python script to get a token from a user interaction with MFA to authorise it. For some reason, it seems that there is some user-agent sniffing, and I haven't try refreshing the token yet, but the gist is updated and should be functional. This still needs to be properly integrated into the lib, but this is looking good. |
It also looks like the Login token doesn't expire (at least not within 24h, so far) |
With Aurora+'s recent push to use MFA, this lib is no longer able to authenticate.
The most obvious impact is the HA integration LeighCurran/AuroraPlusHA#10
The text was updated successfully, but these errors were encountered: