Disable recaptcha

This commit is contained in:
Aaron Lee 2021-10-02 02:38:28 +00:00
parent bfebfa2981
commit eb5e096942
2 changed files with 5 additions and 4 deletions

3
app.py
View file

@ -35,6 +35,7 @@ def check_login_status():
def verify_recaptcha(response): def verify_recaptcha(response):
return True
data = { data = {
'secret': os.environ.get('RECAPTCHA_SECRET'), 'secret': os.environ.get('RECAPTCHA_SECRET'),
'response': response, 'response': response,
@ -56,7 +57,7 @@ def index():
email = request.form['username'] + "@group-attendance.fhjh.tp.edu.tw" email = request.form['username'] + "@group-attendance.fhjh.tp.edu.tw"
if check_login_status(): if check_login_status():
try: try:
if (verify_recaptcha(request.form['g-recaptcha-response'])): if (verify_recaptcha("")):
user = auth.sign_in_with_email_and_password( user = auth.sign_in_with_email_and_password(
email, request.form['password']) email, request.form['password'])
print("Login SUCC:", email, flush=True) print("Login SUCC:", email, flush=True)

View file

@ -19,7 +19,7 @@
gtag('config', 'G-H6D61RSBHR'); gtag('config', 'G-H6D61RSBHR');
</script> </script>
<script src="https://www.google.com/recaptcha/api.js"></script> <!-- <script src="https://www.google.com/recaptcha/api.js"></script> -->
</head> </head>
<body> <body>
@ -46,7 +46,7 @@
data-sitekey="6LevCYccAAAAAAQ8XL6Bay_Nn22OyX9-9Shhi62M" data-callback='loadingAnimation'>Login data-sitekey="6LevCYccAAAAAAQ8XL6Bay_Nn22OyX9-9Shhi62M" data-callback='loadingAnimation'>Login
登入</button> 登入</button>
</form> </form>
<div class="disclaimer"> <div class="disclaimer" hidden="hidden">
This site is protected by reCAPTCHA and the Google This site is protected by reCAPTCHA and the Google
<a target="_blank" href="https://policies.google.com/privacy">Privacy Policy</a> and <a target="_blank" href="https://policies.google.com/privacy">Privacy Policy</a> and
<a target="_blank" href="https://policies.google.com/terms">Terms of Service</a> apply. <a target="_blank" href="https://policies.google.com/terms">Terms of Service</a> apply.