This commit is contained in:
PrajwalM2212 2021-02-20 13:09:10 -08:00 committed by Shreya
parent 9363cadb09
commit 2ee6315bb8
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class Authenticate(flask_restful.Resource):
@staticmethod
def _authenticate(username, secret):
user = user_store.UserStore.username_table.get(username, None)
if user and safe_str_cmp(user.secret, secret):
if user and safe_str_cmp(user.secret.encode('utf-8'), secret.encode('utf-8')):
return user
def post(self):

View File

@ -2,7 +2,7 @@ import {SHA3} from 'sha3';
import decode from 'jwt-decode';
export default class AuthService {
NO_AUTH_CREDS = 'loginwithoutpassword';
NO_AUTH_CREDS = '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()';
SECONDS_BEFORE_JWT_EXPIRES = 20;
AUTHENTICATION_API_ENDPOINT = '/api/auth';