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

username/password authentication with password expiry and account lock #272

Closed
georges opened this issue Nov 24, 2016 · 8 comments
Closed

Comments

@georges
Copy link

georges commented Nov 24, 2016

Anyone knows the best strategy to deal with situation where the SF instance enforces password expiration and account lock? It seems very impractical to deal with changing the password and ensure that no errand process will use the old password and lock the account by the time the updated password + token propagate thru.

Is there an easy way to obtain an OAuth and refresh token from the SF UI for a given account and use that instead of username/password?

@timrogers
Copy link
Collaborator

Could you just build a quick Ruby script to do the OAuth flow for you? I think that'll probably be easiest.

@adamthedeveloper
Copy link

I had our API user's password expire today. I reset the password through salesforce, updated my environment variables and published the new password to all of our hosts. Now, I am getting authentication errors when I try to authenticate! in a rails console. The client is showing the correct password in the attributes. So now I'm stuck. It feels like there is an additional step I probably need to take to get this working again, but I don't know what that would be.

Has anyone else experienced this? Sorry for hi-jacking this issue - it seems somewhat related. Basically, how the heck do we deal with password expiration and, once we understand what that is, what is the best practice for self-healing? Avoiding an outage would be great. I'm currently stuck/down without understanding what step I need to fulfill now that the password has been changed.

Looking for comments that might include a bit more hand-holding / code examples showing how some of you experts have solved it. @timrogers I think you are trying to help, but if you can include some documentation/examples of how to deal with this, that would be tremendous.

Thanks,

Adam

@adamthedeveloper
Copy link

@georges how did you eventually dig yourself out of this? Any help from anyone would be great. I’m blocked from using the API right now.

@georges
Copy link
Author

georges commented Feb 3, 2018 via email

@sicktastic
Copy link
Collaborator

☝️ Yup. That's what I would do as well as @georges mentioned.

@adamthedeveloper
Copy link

@antwonlee @georges Thanks for getting back to me on this guys - I really appreciate it. I'll work on this and report back on the status.

@sicktastic
Copy link
Collaborator

Awesome explanation @georges . @adamthedeveloper please let us know if this worked or not.

@adamthedeveloper
Copy link

@antwonlee @georges I was able to get things going again by setting the security_token parameter to the new value on the clients. Concatenation of the password and the security token caused me to NOT be able to authenticate. After using the password alone (not concatenated with the security token) everything came to life. This is what worked for me.

So, explicitly setting the security token in the client options.

Fortunately, the api user was not blocked yet.

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

4 participants