policyTriggerInteractive static method

Future<String> policyTriggerInteractive(
  1. String policyName,
  2. List<String> scopes,
  3. String? loginHint
)

Runs user flow interactively.

On complete, access, refresh and id tokens are stored correctly according to the platform-specific implementation. And it is possible to retrive the access token or user information (id-token) via the provided methods.

The policyName permits to select which authority (user-flow) trigger from the ones specified in the configuration file. It must be indicated just the name of the policy without the host and tenat part. It is possible to indicate user's scopes for the request (i.e it is also possible to indicate default scopes in the configuration file that can be then accessed from B2CConfiguration.defaultScopes). A loginHint may be passed to directly fill the email/username/phone-number field in the policy flow.

Returns a Future containing a tag String. The tag can be used to differentiate operations. In fact, every AzureB2C asynchronous operation return a B2COperationResult in which the source tag is indicated.

The result of the method call is returned asynchronously to any AzureB2CCallback registered to the B2COperationSource.POLICY_TRIGGER_INTERACTIVE topic.

Possible operation states are:

See also:

Implementation

static Future<String> policyTriggerInteractive(
    String policyName, List<String> scopes, String? loginHint) async {
  var tag = GUIDGen.generate();
  var args = {
    "tag": tag,
    "policyName": policyName,
    "scopes": scopes,
    "loginHint": loginHint
  };

  await _channel.invokeMethod('policyTriggerInteractive', args);
  return tag;
}