def verify_secure_token(self, token: str) -> Optional[dict]:
        """Verify a secure token using the shared secret_key and JWT."""
        try:
            payload = jwt.decode(token, self.secret_key, algorithms=["HS256"])
            exp = payload.get("exp")
            if exp is None or datetime.fromtimestamp(
                exp, tz=timezone.utc
            ) < datetime.now(timezone.utc):
                return None
            return payload
        except (jwt.ExpiredSignatureError, jwt.InvalidTokenError):
            return None
Verify a secure token using the shared secret_key and JWT.
py/core/providers/crypto/nacl.py