Function createAuthMiddlewareForExistingTokenFlow