Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed Jul 7, 2024
1 parent 0711073 commit 8b298be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fastapi_auth/auth_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from .jinja2_templates import templates

from starlette.middleware.sessions import SessionMiddleware
from securecookies import SecureCookiesMiddleware


from .auth_config import AUTH_SETTINGS

Expand All @@ -25,7 +27,8 @@

def install_middleware(app):
app.add_middleware(SessionMiddleware, secret_key=AUTH_SETTINGS.secret_key.get_secret_value())

# app.add_middleware(SecureCookiesMiddleware, secrets=[AUTH_SETTINGS.secret_key.get_secret_value()])
app.add_middleware(SecureCookiesMiddleware, secrets=[b'ZmDfcTF7_60GrrY167zsiPd67pEvs0aGOv2oasOM1Pg='])

@router.get("/login", response_class=HTMLResponse)
async def login(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies = [
"uvicorn",
"markdown",
"starlette-session",
"starlette-securecookies",
"loguru",
"bcrypt",
"jinja2",
Expand Down

0 comments on commit 8b298be

Please sign in to comment.