emailAuth method
Authenticate a user via email.
Sign the provided TEmailAuthBody with the client's stamp function and submit the request (POST /public/v1/submit/email_auth).
See also: stampEmailAuth.
Implementation
Future<TEmailAuthResponse> emailAuth({
required TEmailAuthBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_EMAIL_AUTH_V2',
);
return await request<Map<String, dynamic>, TEmailAuthResponse>(
"/public/v1/submit/email_auth",
body,
(json) => TEmailAuthResponse.fromJson(
transformActivityResponse(json, 'EmailAuth')));
}