I am using Render.com to deploy online a flask app. I want it to first login using Google OAuth before accessing the website. However, I must be doing something wrong because it does pull up the "login with google" but immediately gives this error below.
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=http://www.**********.org/login/google/authorized flowName=GeneralOAuthFlow
The URI I put in the Google Cloud Console is https://storytrack.org/login/google/authorized because it seems it requires the link to be an https for OAuth to work. However, I don't know why it keeps trying to send the request as an http. When on the website as usual it shows it is through https, so where is it getting http from?
A section from the flask code
google_bp = make_google_blueprint(
client_id=os.environ["GOOGLE_CLIENT_ID"],
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
scope=["profile", "email"],
redirect_url="https://**********.org/login/google/authorized"
)
app.register_blueprint(google_bp, url_prefix="/login")
I'm not too familiar with any of this so any help is great. This could be a very obvious solution for all I know. Thanks!
Have tried adding both http and https to google console URI's. It does work but when it tries to redirect it says OAuth requires HTTPS.
www.prefix in the URL the error message mentions?