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

Unable to authenticate #13

Closed
emadde opened this issue Aug 2, 2022 · 24 comments
Closed

Unable to authenticate #13

emadde opened this issue Aug 2, 2022 · 24 comments

Comments

@emadde
Copy link

emadde commented Aug 2, 2022

Thanks for the help.

I have tried many times to set/ export the variables (AMZNFLEXUSERNAME & AMZNFLEXPWD), but it is giving me the following:

"Unable to authenticate to Amazon Flex. Please provide a valid Amazon Flex username and password."

Is the app still working?

@Ahdrumond
Copy link

Following. I have the same issue.

@Mystogun
Copy link

Me too

@ususus1987
Copy link

ususus1987 commented Aug 10, 2022

I have the same issue as well

@Mystogun
Copy link

Mystogun commented Aug 10, 2022

After more digging I found that
https://api.amazon.com/auth/register returns a challenge -that should be viewed on web- something like a captcha!

But, unfortunately I have no experience with how to deal with or bypass them

@ghost
Copy link

ghost commented Aug 14, 2022

Start Charles proxy and sign out of amazon flex and then sign in back. In the Charles you will see api.amazon link, remember to enable SSL. Then copy your device serial number and frc from Charles and paste it into the script. And you are good to go.

@figamore
Copy link

Start Charles proxy and sign out of amazon flex and then sign in back. In the Charles you will see api.amazon link, remember to enable SSL. Then copy your device serial number and frc from Charles and paste it into the script. And you are good to go.

This is good info. Would you happen to know what the FRC string is for? And does it change between sessions?

@ghost
Copy link

ghost commented Aug 15, 2022 via email

@figamore
Copy link

figamore commented Aug 15, 2022 via email

@ghost
Copy link

ghost commented Aug 15, 2022 via email

@mkb79
Copy link

mkb79 commented Aug 18, 2022

This is good info. Would you happen to know what the FRC string is for? And does it change between sessions?

Here you can read about encrypting and decrypting the frc cookie. And here is a gist how it works in production.

@mdesilva
Copy link
Owner

mdesilva commented Sep 4, 2022

@mkb79 Thanks for your insight here on the FRC key. Do you know if there is a way to generate the FRC without the user having to sign in to Amazon Flex on their device ?

@mkb79
Copy link

mkb79 commented Sep 4, 2022

@mdesilva
For sure. Read this example for Goodreads. It works very similar to Amazon Flex device registration. Compare it with your code here.

@figamore
Copy link

figamore commented Sep 4, 2022

@mkb79 Thanks for your insight here on the FRC key. Do you know if there is a way to generate the FRC without the user having to sign in to Amazon Flex on their device ?

No need to waste time with the FRC. Amazn doesn't require it anymore. Better find out what the best way not to get rate limited is instead.

@mkb79
Copy link

mkb79 commented Sep 4, 2022

@figamore
The frc cookie is needed if you want to add (register) a new device without to signin separately.

@figamore
Copy link

figamore commented Sep 4, 2022

@figamore

The frc cookie is needed if you want to add (register) a new device without to signin separately.

I understand that, but specifically for Amazon Flex this is not needed.

@mkb79
Copy link

mkb79 commented Sep 4, 2022

@figamore
Can you explain me more, why the frc is not needed? How do you register a new device for Amazon Flex? Or make Flex don’t use of devices?!

@figamore
Copy link

figamore commented Sep 4, 2022

@figamore

Can you explain me more, why the frc is not needed? How do you register a new device for Amazon Flex? Or make Flex don’t use of devices?!

You just don't need it on this platform. The requests will succeed whether or not you include FRC.

@Xande1
Copy link

Xande1 commented Sep 4, 2022

Repo has been cloned, but I still can't authenticate for nothing. So how are you guys bypassing this issue if it's not an FRC problem?

@figamore
Copy link

figamore commented Sep 4, 2022

Repo has been cloned, but I still can't authenticate for nothing. So how are you guys bypassing this issue if it's not an FRC problem?

Amz changed the Flex login and rate limiting workflow recently. This bot is good as dead. If you want to keep playing around with it, the way to login is by logging in to amazon with your flex account through a browser on the computer you're running the script in, verify your email/phone, and then it will let you login.

@Xande1
Copy link

Xande1 commented Sep 4, 2022

Repo has been cloned, but I still can't authenticate for nothing. So how are you guys bypassing this issue if it's not an FRC problem?

Amz changed the Flex login and rate limiting workflow recently. This bot is good as dead. If you want to keep playing around with it, the way to login is by logging in to amazon with your flex account through a browser on the computer you're running the script in, verify your email/phone, and then it will let you login.

Thanks, I was able to authenticate following your advice. Now it complains about ERROR: 'twilioAcctSid' was not set. That looks like it's an option on the config file. I have tried to set the twilioAcctSID with my deviceId and twilioAuthToken with deviceSerialNumber sniffed from charlesproxy. That didn't work.

@figamore
Copy link

figamore commented Sep 4, 2022

Repo has been cloned, but I still can't authenticate for nothing. So how are you guys bypassing this issue if it's not an FRC problem?

Amz changed the Flex login and rate limiting workflow recently. This bot is good as dead. If you want to keep playing around with it, the way to login is by logging in to amazon with your flex account through a browser on the computer you're running the script in, verify your email/phone, and then it will let you login.

Thanks, I was able to authenticate following your advice. Now it complains about ERROR: 'twilioAcctSid' was not set. That looks like it's an option on the config file. I have tried to set the twilioAcctSID with my deviceId and twilioAuthToken with deviceSerialNumber sniffed from charlesproxy. That didn't work.

You should only set twilioACCTSID with the SID of your Twilio API if and only if you have a Twilio account and want to receive text notifications, otherwise leave it blank. Also, there's a spelling mistake in the variable twilioAcctSid. Make sure its spelled the same in both the config file and the main bot python file, I think "twilioAcctSID" in config file needs to be changed to "twilioAcctSid"

@mdesilva
Copy link
Owner

mdesilva commented Sep 6, 2022

@figamore The typo with the twilioAcctSid has been fixed. As for the login flow change for Amazon Flex, how does a user authenticate on the computer they are running the script in ? Is there a URL where that can be done ?

@mkb79
Copy link

mkb79 commented Sep 8, 2022

I've posted a link to an example, how to register a Goodreads device, above. This can be adept to Amazon Flex. If you have 2FA enabled, you can add your OTP code to your password or you have to solve a challenge on a Amazon page. And then you are in.

Besides a access token, the device registration response gives you a refresh token too. So you can refresh your token without needing a new device registration (or authorization).

@ususus1987
Copy link

Thanks mkb79

@mdesilva mdesilva closed this as completed Sep 9, 2022
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

No branches or pull requests

8 participants