-
Notifications
You must be signed in to change notification settings - Fork 475
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
Changes to login via sherriff id verification #510
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected
67a03a2
to
98df0c7
Compare
@jmfernandes this is an important fix, can you take a look and merge it? Thanks. |
raise Exception("Challenge not validated") | ||
raise Exception("Id not returned in user-machine call") | ||
|
||
def _get_sherrif_challenge(token_id:str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is _get_sheriff_challenge
used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a new function used only in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hes referring to line 241 function, not the validation handler, of which he is correct, the function starting at line 241 is not called anywhere and then the logic calls data value without it being in the args nor subscripted to anything. Just trying to help, the rest of the script seems pretty good
'flow': 'suv', | ||
'input':{'workflow_id': workflow_id} | ||
} | ||
data = request_post(url=url, payload=payload,json=True ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT extra space at end of request_post
params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, I had to disable autoformatting on my end as it was introducing lot of changes on PR.
Thanks for all the time and effort, it is very much appreciated, I wish I could help but this is way above my head. |
This fixed the login error for me |
For anyone else still stuck I found a work around after using the new module that included the extra validation (but still wasnt allowing requests, would return normal like i was logged in but I was not actually logged in, always failed at first request logic). I had to set up 3rd party authentication via the robinhood app, I used google auth app, but I dont think what you use for this matters, as long as the app will generate the totp_secret (random 6 digit code periodically generated and can be requested once you set up the robinhood app to auth using said app. After this I put any sensitive requests into my user environment variables via "edit the system environment variables". After all of this is adjusted, the login is as follows: (I realize to many of you this message is unnecessary, but i wanted to contribute any way i can, had no idea there were this many people trying to keep this module going, greatly appreciate you, and if anyone is interested in indicators and strategies 4 crypto & stocks I have any indicator you could possibly name + some experimentals in testing phase, some great performing strategies that are optimized for dry markets, so they typically dont need much volitility to perform well, and finally I have 3 machine learning models used for predictions (test phase, showing promise, gpu required to run them) u can contact me at mgates8900@gmail.com if any of this interests anyone, but i digress, now onto the work around for the api update): |
This works for me. Will be using this branch until merged in. |
@jmfernandes let us know if you have any concerns for merging the PR. |
Thanks everyone for getting this resolved. Do we understand the root cause? Did the API change? |
@Two20Two21 From what I have gathered the root cause was they updated the API to require 2 factor authentication, for example i couldnt get the new authentication script to work until i used a 3rd party app to verify login, whereas before i had device approvals as my security method, and that used to work just fine, it would prompt me to verify via mobile phone when logging the bot in, now if you try this it will still prompt you to verfy new device login but the script will get a key error, so they added an extra step to their security, as for all the details someone else would have to comment that has more experience with that data. |
Iam using R and below is the syntax Iam using, it was working last week but now getting below error. Please provide correct syntax to use. Thanks RH <- RobinHood ("gmail.com", "password", mfa_code="012601") |
ok,I'm like totally confused.What is the full correct code we are supposed to be using? |
Load required librarieslibrary(httr) Function to authenticate and handle TOTPRobinHoodAuth <- function(username, password, totp_secret) { Generate TOTP code using the provided secrettotp <- TOTP$new(totp_secret) Generate a device token for unique identificationdevice_token <- uuid::UUIDgenerate() Prepare the login payloadlogin_payload <- list( API URL for authenticationlogin_url <- "https://api.robinhood.com/oauth2/token/" Send POST request to authenticateresponse <- httr::POST( Check response statusif (response$status_code == 200) {
} else { Example usage:Replace with your own credentials and TOTP secretusername <- "your_username" Authenticate and retrieve session datasession_data <- RobinHoodAuth(username, password, totp_secret) |
No description provided.