Skip to content

Commit

Permalink
add remember option to login_user() call
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Jul 3, 2024
1 parent 1b9c528 commit 86ed433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pypnusershub/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def login(provider="local_provider"):
if isinstance(auth_result, Response):
return auth_result
if isinstance(auth_result, models.User):
login_user(auth_result)
login_user(auth_result, remember=True)
user_dict = UserSchema(
exclude=["remarques"], only=["+max_level_profil", "+providers"]
).dump(auth_result)
Expand Down Expand Up @@ -245,7 +245,7 @@ def authorize(provider="local_provider"):
auth_provider = current_app.auth_manager.get_provider(provider)
authorize_result = auth_provider.authorize()
if isinstance(authorize_result, models.User):
login_user(authorize_result)
login_user(authorize_result, remember=True)

# if auth_provider.is_external:
return redirect(current_app.config["URL_APPLICATION"])
Expand Down

0 comments on commit 86ed433

Please sign in to comment.