MSALNativeAuthFlowDelegate

@objc
public protocol MSALNativeAuthFlowDelegate

Shared base delegate for all Native Auth V2 (server-driven) flows.

Unlike V1 - which exposes a different delegate protocol per step - V2 uses one family of delegates for sign up, sign in and reset password. The SDK drives the flow and reports back through these callbacks; the app reacts and continues the flow by calling methods directly on the MSALNativeAuthState it is handed.

This base protocol declares only the two terminal callbacks (onFlowCompleted(result:scenario:) and onFlowError(error:scenario:)) that every flow reports. Each server-driven state is delivered through its own per-state delegate protocol (e.g. MSALNativeAuthCodeRequiredDelegate) that extends this base and adds a single strongly-typed, required callback. The app conforms to the per-state protocols for the states it wants to handle; if it does not conform to a state’s protocol, onFlowError(error:scenario:) is called with error type notImplemented.

All callbacks are invoked on the main actor.

Warning

This API is experimental. It may be changed in the future without notice. Do not use in production applications.