app/auth/service.py
def decode_auth_token(token):
    """Convert token to original payload using secret key if the token is valid"""
    try:
        payload = jwt.decode(token, app.config["SECRET_KEY"], algorithms="HS256")
        return payload
    except jwt.ExpiredSignatureError as ex:
        raise TokenExpiredError() from ex
    except jwt.InvalidTokenError as ex:
        raise InvalidTokenError() from ex
Convert token to original payload using secret key if the token is valid
Convert token to original payload using secret key if the token is valid
Convert token to original payload using secret key if the token is valid
def decode_auth_token(token):
    try:
        payload = jwt.decode(token, app.config["SECRET_KEY"], algorithms="HS256")
        return payload
    except jwt.ExpiredSignatureError as ex:
        raise TokenExpiredError() from ex
    except jwt.InvalidTokenError as ex:
        raise InvalidTokenError() from ex
def decode_auth_token ( token ) : try : payload = jwt . decode ( token , app . config [ "SECRET_KEY" ] , algorithms = "HS256" ) return payload except jwt . ExpiredSignatureError as ex : raise TokenExpiredError ( ) from ex except jwt . InvalidTokenError as ex : raise InvalidTokenError ( ) from ex
Convert token to original payload using secret key if the token is valid
Convert token to original payload using secret key if the token is valid
"""Convert token to original payload using secret key if the token is valid"""
token