Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

HTTP Error 401: Unauthorized #22

Closed
tblossfeld opened this issue Mar 31, 2016 · 10 comments
Closed

HTTP Error 401: Unauthorized #22

tblossfeld opened this issue Mar 31, 2016 · 10 comments

Comments

@tblossfeld
Copy link

I have gone over the setup and fixed a few issues I had with the config file. Unfortunately, when I run the test, I am hitting an Unauthorized error that I cannot seem to get past. Attached is a screenshot of the problem. Any thoughts on why this may be occurring?

error_unauthorized

@kdlucas
Copy link
Contributor

kdlucas commented Mar 31, 2016

This makes me think that something in the data (line 126 or _oauth2.py) is not correct. This is constructed in lines 110-114 of the same file, and uses client_id, client_secret and refresh token. Make sure you downloaded the correct client_id and client_secret from the google developer console: console.developers.google.com

@tblossfeld
Copy link
Author

Yes, I have verified this several times. Is it possible a blocked port could cause this?

Incidentally, in your instructions, you say:

"Two tokens are needed: under Client ID for native applications, copy the Client ID and Client Secret"

I don't see anything in the Credentials page that actually says "native applications".

@kdlucas
Copy link
Contributor

kdlucas commented Mar 31, 2016

Do you see a credential with the name Native client? What name or names do
you see on the OAuth 2.0 client IDs page, under the Credentials tab?

Kelly
kdLucas

On Thu, Mar 31, 2016 at 10:36 AM, tblossfeld notifications@github.com
wrote:

Yes, I have verified this several times. Is it possible a blocked port
could cause this?

Incidentally, in your instructions, you say:

"Two tokens are needed: under Client ID for native applications, copy the
Client ID and Client Secret"

I don't see anything in the Credentials page that actually says "native
applications".


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#22 (comment)

@tblossfeld
Copy link
Author

Here are the options I see when I go to create a 0Auth Client

credentials

@kdlucas
Copy link
Contributor

kdlucas commented Mar 31, 2016

So it looks like you haven't created any client IDs yet. Go ahead and
select Web application and create one. Once it's created you can then
download it as a file to get both the id and secret.

Kelly
kdLucas

On Thu, Mar 31, 2016 at 10:58 AM, tblossfeld notifications@github.com
wrote:

Here are the options I see when I go to create a 0Auth Client

[image: credentials]
https://cloud.githubusercontent.com/assets/17885939/14185600/a2d15eb0-f748-11e5-816f-b429f2c4fe35.png


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#22 (comment)

@tblossfeld
Copy link
Author

I have created both a Web Application and an "Other" client. I have tried both with the same results.

After talking to engineering, we may have some hard-coded credentials that have expired. This may be related.

@tblossfeld
Copy link
Author

After doing some more research, I am wondering if I need to add "Authorized redirect URIs" to the client ID. I don't see any mention of this in the README file. Do I need to add something here, and if so, what would I be adding? (Below is a screenshot of the client ID circling the area I am talking about for clarification).

authorization

@kdlucas
Copy link
Contributor

kdlucas commented Apr 25, 2016

No Client redirects should be needed.

Kelly
kdLucas

On Mon, Apr 25, 2016 at 6:13 AM, tblossfeld notifications@github.com
wrote:

After doing some more research, I am wondering if I need to add
"Authorized redirect URIs" to the client ID. I don't see any mention of
this in the README file. Do I need to add something here, and if so, what
would I be adding? (Below is a screenshot of the client ID circling the
area I am talking about for clarification).

[image: authorization]
https://cloud.githubusercontent.com/assets/17885939/14784912/e9a8196a-0ac5-11e6-928d-9b766cb496d5.png


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#22 (comment)

@tblossfeld
Copy link
Author

Digging more into this, it looks like I cannot access the authorization site. The address listed in the configuration file for this is:

OAUTH = 'https://accounts.google.com/o/oauth2/auth'
OAUTH_TOKEN = 'https://www.googleapis.com/oauth2/v3/token'

I have attempted to use these values with Postman, and am getting a log in error. If I use other values, such as github address, I do not get an error.

Can you confirm that these values are correct?

@tblossfeld
Copy link
Author

After updating to the latest version, I am no longer receiving this error. Closing this issue.

kool814 pushed a commit to kool814/cloudprint_logocert that referenced this issue Jul 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants