FreshSupaSulley / Auto-2FA

Login through Duo Mobile in your browser
https://chrome.google.com/webstore/detail/duochrome/bnfooenhhgcnhdkdjelgmmkpaemlnoek
MIT License
24 stars 6 forks source link

Duo Mobile needs to be updated before you can log in. #10

Open ldzhjn opened 6 months ago

ldzhjn commented 6 months ago

Duochrome is show the below error message when tried to login.

"Duo denied handling request at /push/v2/device/transactions/(was the device deleted?)" Stack: undefined

Duo page shows

Duo Mobile update required Duo Mobile needs to be updated before you can log in.

Maybe we need to change the version in here? https://github.com/FreshSupaSulley/Duochrome/blob/main/chrome/popup.js#L164

FreshSupaSulley commented 6 months ago

Weird. I can't replicate this issue. Can you include some screenshots / network transactions from the inspector?

I tried recreating a device as well and I couldn't get anything to fail.

nwithan8 commented 6 months ago

I am also now facing the same issue.

image

Tried deleting and re-adding a new device, still immediately facing this issue, so it's not the registered device.

FreshSupaSulley commented 6 months ago

I can't replicate this behavior. Do you know how to load unpacked extensions? I'd like to change the version number in the activation endpoint line in popup.js and have you try to register another device to see if that's the issue.

nwithan8 commented 6 months ago

Sure, what's the version number I should be switching to?

FreshSupaSulley commented 6 months ago

Unsure. Try the latest version, 4.62.0. I changed the line just now only for chrome, you can pull the repo and load the unpacked extension using the chrome folder as the root. If that doesn't work, experiment with the line in popup.js below:

request.send("?customer_protocol=1&pubkey=" + encodeURIComponent(pemFormat) + "&pkpush=rsa-sha512&jailbroken=false&architecture=arm64&region=US&app_id=com.duosecurity.duomobile&full_disk_encryption=true&passcode_status=true&platform=Android&app_version=3.49.0&app_build_number=323001&version=11&manufacturer=unknown&language=en&model=Browser%20Extension&security_patch_level=2021-02-01");

nwithan8 commented 6 months ago

request.send("?customer_protocol=1&pubkey=" + encodeURIComponent(pemFormat) + "&pkpush=rsa-sha512&jailbroken=false&architecture=arm64&region=US&app_id=com.duosecurity.duomobile&full_disk_encryption=true&passcode_status=true&platform=Android&app_version=3.49.0&app_build_number=323001&version=11&manufacturer=unknown&language=en&model=Browser%20Extension&security_patch_level=2021-02-01");

That seems to have fixed it.

FreshSupaSulley commented 6 months ago

Awesome. I'll issue an update to all platforms, thanks for helping to fix this. Might need to make some sort of different error message explaining this issue.

Before I close this, I'd like to see what the Duo API is giving you when it wants you to upgrade to a newer app version. With the original Duochrome installation, would you mind providing the network request data that appears in the console after you hit Try Again? Right click Duochrome -> Inspect Popup, head to the network tab, then click the button to issue the request again. I'd like to see if the API is giving you any indication of why it's failing and if so, I'll need to change the error screen to show that you need to create another device.

nwithan8 commented 6 months ago

And, of course, now the old 3.49.0 version no longer fails, figures.

FreshSupaSulley commented 6 months ago

lmao ok Well if it breaks again just lmk

FreshSupaSulley commented 6 months ago

Activating Duochrome now ships updated device information from a recent version of the Android APK to the API. This won't change the behavior of any current devices but will allow you to re-register with new device information.

I'll be making a smaller patch soon that will attempt to update version info for current devices once 1.4.0 is approved.