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

OAuth changes causing 401 exceptions #31

Closed
datashaman opened this issue Jan 26, 2017 · 4 comments
Closed

OAuth changes causing 401 exceptions #31

datashaman opened this issue Jan 26, 2017 · 4 comments

Comments

@datashaman
Copy link
Contributor

datashaman commented Jan 26, 2017

The changes since 5.0.0 result in 401 Unauthorized responses (where authentication is used). Specifically I'm seeing it on File.upload(). File.download() still works as it did, unsure why.

I notice there is a new-ish AuthHelper class, unsure how to use it from a back-end application. I assume there's some new method of authenticating which I'm not doing correctly.

@datashaman
Copy link
Contributor Author

Never mind, I see the README mentions it, I'll investigate further.

@cenkalti
Copy link
Owner

cenkalti commented Jan 26, 2017 via email

@datashaman
Copy link
Contributor Author

datashaman commented Jan 27, 2017

I'm struggling to get the Put.IO OAuth server to allow me to use it from the backend only. My app is a suite of CLI commands that run on a server. No user input is possible.

The commands were all working by using the OAuth Token listed on the app's page on Put.IO. But that stopped working a few days ago, presumably something was changed on the server.

I noticed yesterday that the OAuth Token changes: when I've left my browser on the app page and press refresh, different value. shrug that method doesn't work anymore.

Please let me know if there's a way to use your OAuth implementation from another server (using python if possible). The Internet says it's called 2-legged OAuth.

I've tried to use basic auth on the oauth2 endpoint so I can get the access token programmatically, but no dice.

Are you using a known python package for the OAuth server implementation? Any clue would help. :)

@cenkalti
Copy link
Owner

Hello @datashaman.

Are you using a known python package for the OAuth server implementation? Any clue would help. :)

We don't use a known Python package for the server implementation.

I noticed yesterday that the OAuth Token changes: when I've left my browser on the app page and press refresh, different value. shrug that method doesn't work anymore.

Actually, there was a bug that causes a new token to be created on page load if your IP address is different from the previous one. It is fixed now. However, the old token was still valid, you just didn't see it on the app page anymore.

If you can tell what you are trying to achieve and maybe provide a code snippet, I will be happy to help to solve the problem.

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

2 participants