TokenClientConfig constructor
TokenClientConfig({
- required String client_id,
- required TokenClientCallbackFn callback,
- required List<
String> scope, - bool? include_granted_scopes,
- String? prompt,
- bool? enable_granular_consent,
- @Deprecated('Use `enable_granular_consent` instead.') bool? enable_serial_consent,
- String? login_hint,
- String? hd,
- String? state,
- ErrorCallbackFn? error_callback,
Constructs a TokenClientConfig object in JavaScript.
The callback
property must be a Dart function and not a JS function.
Implementation
factory TokenClientConfig({
required String client_id,
required TokenClientCallbackFn callback,
required List<String> scope,
bool? include_granted_scopes,
String? prompt,
bool? enable_granular_consent,
@Deprecated('Use `enable_granular_consent` instead.')
bool? enable_serial_consent,
String? login_hint,
String? hd,
String? state,
ErrorCallbackFn? error_callback,
}) {
assert(scope.isNotEmpty);
return TokenClientConfig._toJS(
client_id: client_id.toJS,
callback: callback.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,
hd: hd?.toJS,
state: state?.toJS,
error_callback: error_callback?.toJS,
);
}