This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import Request, Depends, HTTPException, Response | |
from fastapi.responses import RedirectResponse | |
# This must be randomly generated | |
RANDON_SESSION_ID = "iskksioskassyidd" | |
# This must be a lookup on user database | |
USER_CORRECT = ("admin", "admin") | |
# This must be Redis, Memcached, SQLite, KV, etc... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://myaccount.google.com/lesssecureapps | |
import datetime as dt | |
from datetime import datetime | |
import time , smtplib | |
def send_email(have): | |
email_user = '***@gmail.com' # email here | |
server = smtplib.SMTP ('smtp.gmail.com', 587) | |
server.starttls() | |
server.login(email_user, '***') # pass here or read from input | |
message = """\ |