add auth to flex