Skip to content

Commit

Permalink
Update login.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyu9 authored Jan 17, 2025
1 parent 47ba2af commit 2597467
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cogs/SSO/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from werkzeug.exceptions import BadRequestKeyError


def sso_login_cogs(database, error):
def sso_login_cogs(database, error, global_domain):
if request.method == 'POST': # Si l'utilisateur à rempli le formulaire
username = request.form['username'] # Sauvegarde du nom d'utilisateur
password = request.form['password'] # Sauvegarde du mot de passe
Expand Down Expand Up @@ -38,8 +38,8 @@ def sso_login_cogs(database, error):
response = make_response(redirect(domain_to_redirect[0], code=302))

# Création des cookies de vérification d'authentification
response.set_cookie('token', row[1])
response.set_cookie('validation', validation_code[0])
response.set_cookie('token', row[1], domain='.'+str(global_domain))
response.set_cookie('validation', validation_code[0], domain='.'+str(global_domain))
return response
else: # Dans tout les autres cas
return redirect(url_for('sso_login', error='1'))
Expand Down

0 comments on commit 2597467

Please sign in to comment.