4

I work on a project with Django, Google API Calendar and OAuth 2 and I have the follow error:

(insecure_transport) OAuth 2 MUST utilize https. 

When I set the redirect_uri with google_auth_oauthlib.flow.Flow, the URI that I set is: http://localhost:8000/google/oauthcallback.

1 Answer 1

5

The error states to use a HTTPS connection which you can either set one with an SSL certificate or allow a HTTP connection in the environment like so:

import os os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' 

From this answer

Sign up to request clarification or add additional context in comments.

2 Comments

I set these lines but I have the follow error: (invalid_client) Unauthorized

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.