(insecure_transport) OAuth 2 MUST utilize https.
See original GitHub issueMy site is fully SSL secured. Yet when I try to exchange the code I get this:
(insecure_transport) OAuth 2 MUST utilize https..
Chrome shows me the following message:
The page includes a form with a non-secure "action" attribute.
Yet I can’t really figure out what the problem is. I double checked and the only requests I made are to the Google Apis which are fully secured.
My function looks like this:
def exchange_code(request): #/setup
oauth = get_oauth()
authorization_code = request.build_absolute_uri()
try:
token = oauth.fetch_token(
'https://accounts.google.com/o/oauth2/token',
authorization_response=authorization_code,
client_secret=settings.GOOGLE_OAUTH2_CLIENT_SECRET)
except MissingCodeError as error:
return error_page(request, error)
What can be the problem?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Getting (insecure_transport) OAuth 2 MUST utilize https with ...
I'm trying to user google sheets API service, which requires an HTTPS connection. I'm getting the ...
Read more >OAuth fails with "Must utilize https", but everything is https
I set up Google OAuth for my seafile installation. When I'm using it, ... oauth_callback (insecure_transport) OAuth 2 MUST utilize https.
Read more >Web App Example of OAuth 2 web application flow
N.B: You should note that Oauth2 works through SSL layer. If your server is not parametrized to allow HTTPS, the fetch_token method will...
Read more >(insecure_transport) OAuth 2 MUST utilize https. - Bountysource
(insecure_transport) OAuth 2 MUST utilize https. requests. 31 August 2017 Posted by Cosbgn. My site is fully SSL secured. Yet when I try...
Read more >This file is indexed. - APT Browse
/usr/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/errors.py is in ... error = 'insecure_transport' description = 'OAuth 2 MUST utilize https.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This should help
This might be because of “authorization_code = request.build_absolute_uri()”. Have you tried printing it. It should contain “https” not “http”. If it is not generating https the replace the string. Worked for me