OverridableTokenClientConfig constructor

OverridableTokenClientConfig({
  1. List<String>? scope,
  2. bool? include_granted_scopes,
  3. String? prompt,
  4. bool? enable_granular_consent,
  5. @Deprecated('Use `enable_granular_consent` instead.') bool? enable_serial_consent,
  6. String? login_hint,
  7. String? state,
})

Constructs an OverridableTokenClientConfig object in JavaScript.

Implementation

factory OverridableTokenClientConfig({
  /// A list of scopes that identify the resources that your application could
  /// access on the user's behalf. These values inform the consent screen that
  /// Google displays to the user.
  // b/251971390
  List<String>? scope,

  /// Enables applications to use incremental authorization to request access
  /// to additional scopes in context. If you set this parameter's value to
  /// `false` and the authorization request is granted, then the new access
  /// token will only cover any scopes to which the `scope` requested in this
  /// [OverridableTokenClientConfig].
  bool? include_granted_scopes,

  /// A space-delimited, case-sensitive list of prompts to present the user.
  ///
  /// See `prompt` in [TokenClientConfig].
  String? prompt,

  /// If set to false, "more granular Google Account permissions" would be
  /// disabled for OAuth client IDs created before 2019. If both
  /// `enable_granular_consent` and `enable_serial_consent` are set, only
  /// `enable_granular_consent` value would take effect and
  /// `enable_serial_consent` value would be ignored.
  ///
  /// No effect for newer OAuth client IDs, since more granular permissions is
  /// always enabled for them.
  bool? enable_granular_consent,

  /// This has the same effect as `enable_granular_consent`. Existing
  /// applications that use `enable_serial_consent` can continue to do so, but
  /// you are encouraged to update your code to use `enable_granular_consent`
  /// in your next application update.
  ///
  /// See: https://developers.googleblog.com/2018/10/more-granular-google-account.html
  @Deprecated('Use `enable_granular_consent` instead.')
  bool? enable_serial_consent,

  /// When your app knows which user it is trying to authenticate, it can
  /// provide this parameter as a hint to the authentication server. Passing
  /// this hint suppresses the account chooser and either pre-fills the email
  /// box on the sign-in form, or selects the proper session (if the user is
  /// using multiple sign-in), which can help you avoid problems that occur if
  /// your app logs in the wrong user account.
  ///
  /// The value can be either an email address or the `sub` string, which is
  /// equivalent to the user's Google ID.
  ///
  /// About Multiple Sign-in: https://support.google.com/accounts/answer/1721977
  String? login_hint,

  /// **Not recommended.** Specifies any string value that your application
  /// uses to maintain state between your authorization request and the
  /// authorization server's response.
  String? state,
}) {
  assert(scope == null || scope.isNotEmpty);
  return OverridableTokenClientConfig._toJS(
    scope: scope?.join(' ').toJS,
    include_granted_scopes: include_granted_scopes?.toJS,
    prompt: prompt?.toJS,
    enable_granular_consent: enable_granular_consent?.toJS,
    enable_serial_consent: enable_serial_consent?.toJS,
    login_hint: login_hint?.toJS,
    state: state?.toJS,
  );
}