listAuthMethods method
Returns all available application auth methods.
Implementation
Future<AuthMethodsList> listAuthMethods({
String? fields,
Map<String, dynamic> query = const {},
Map<String, String> headers = const {},
}) {
// @todo remove after deleting the pre v0.23 API response fields
final enrichedQuery = Map<String, dynamic>.of(query);
enrichedQuery["fields"] ??= "mfa,otp,password,oauth2";
return client
.send<Map<String, dynamic>>(
"$baseCollectionPath/auth-methods",
query: enrichedQuery,
headers: headers,
)
.then(AuthMethodsList.fromJson);
}