app/auth/service.py
def login_user(username, password):
    """Generate a new auth token for the user"""
    saved_user = User.query.filter_by(username=username).first()
    if saved_user and check_password(password, saved_user.password):
        token = encode_auth_token(saved_user.id)
        return token
    else:
        raise InvalidCredentialsError()
Generate a new auth token for the user
Generate a new auth token for the user
Generate a new auth token for the user
def login_user(username, password):
    saved_user = User.query.filter_by(username=username).first()
    if saved_user and check_password(password, saved_user.password):
        token = encode_auth_token(saved_user.id)
        return token
    else:
        raise InvalidCredentialsError()
def login_user ( username , password ) : saved_user = User . query . filter_by ( username = username ) . first ( ) if saved_user and check_password ( password , saved_user . password ) : token = encode_auth_token ( saved_user . id ) return token else : raise InvalidCredentialsError ( )
Generate a new auth token for the user
Generate a new auth token for the user
"""Generate a new auth token for the user"""
username
password