So - I’m trying to set up a Google Oauth2 authentication routine in Flask (I know, I’m a hipster) but am having some trouble with enforcing the SSL required through Flask.
When I try ssl_context="adhoc"
I just get a Repl that wont’ actually get into Webview
Here’s a sample project just to demonstrate the SSL enforcement isn’t working: https://replit.com/@davidog/AverageZealousJava?v=1
Any help would be appreciated fellow Repliters! 
Hi!
It doesn’t seem the link you sent (https://replit.com/@davidog/AverageZealousJava?v=1) is public.
Apologies, should be public now and good to go
Is this the error you see on your end?
That’s the one, I’m sure I’m just being a muppet
Try updating you code to:
from flask import Flask
import cryptography
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello from Flask!'
app.run(host='0.0.0.0', port=8100)
THis doesn’t enforce https - so my Google OAuth Post commands end up going plaintext
I’m not sure then… sorry.
1 Like
@ShaneAtReplit any thoughts my friend?
Hmm, that is indeed very perculiar… Are you making requests to your server internally?
Hey @DavidAtReplit!
I’m so sorry for missing this.
From what I gathered online, ssl_context="adhoc"
uses a self-signed SSL certificate, which might be why our webview isn’t working with it. However, your hosted website should always have SSL since we automatically provide a certificate for both replit.app
and repl.co
.
If you were having issues when omitting the ssl_context
option, can you elaborate on that so i can try to reproduce or understand the issue better?