Skip to content

Commit

Permalink
Merge pull request #2111 from GSA/Disabling_verify_email_for_now
Browse files Browse the repository at this point in the history
Ok, commenting out the check for emails for now.
  • Loading branch information
ccostino authored Nov 13, 2024
2 parents 0091fd0 + 9796d42 commit ad50568
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/main/views/sign_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
from app.models.user import User
from app.utils import hide_from_search_engines
from app.utils.login import get_id_token, is_safe_redirect_url
from app.utils.time import is_less_than_days_ago

# from app.utils.time import is_less_than_days_ago
from app.utils.user import is_gov_user
from notifications_utils.url_safe_token import generate_token

Expand Down Expand Up @@ -134,16 +135,17 @@ def _do_login_dot_gov(): # $ pragma: no cover
f"Retrieved user {user['id']} from db #notify-admin-1505"
)

# Check if the email needs to be revalidated
is_fresh_email = is_less_than_days_ago(
user["email_access_validated_at"], 90
)
if not is_fresh_email:
# send email verify
ttl = 24 * 60 * 60
verify_key = f"login-verify_email-{unquote(state)}"
redis_client.set(verify_key, state, ex=ttl)
return verify_email(user, redirect_url)
# Temporary disabling of this until we figure out what is happening.
# # Check if the email needs to be revalidated
# is_fresh_email = is_less_than_days_ago(
# user["email_access_validated_at"], 90
# )
# if not is_fresh_email:
# # send email verify
# ttl = 24 * 60 * 60
# verify_key = f"login-verify_email-{unquote(state)}"
# redis_client.set(verify_key, state, ex=ttl)
# return verify_email(user, redirect_url)

usr = User.from_email_address(user["email_address"])
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
Expand Down

0 comments on commit ad50568

Please sign in to comment.