auth method
void
auth({})
Logs a one-shot auth event without awaiting a future.
Use when the operation isn't structured as a Future (e.g. logging an
already-completed result, emitting a breadcrumb, or recording failure
from a callback).
Implementation
void auth({
required String source,
required String operation,
String? userId,
String? provider,
bool? success,
Object? error,
Duration? duration,
Map<String, Object?>? meta,
ISpectTraceConfig? config,
String? correlationId,
}) {
if (!isEnabled) return;
traceCategory(
category: authCategory,
source: source,
operation: operation,
success: success,
error: error,
duration: duration,
meta: boundedTraceMeta(
fields: {
if (userId != null) 'userId': userId,
if (provider != null) 'provider': provider,
},
overrides: meta,
),
config: config,
correlationId: correlationId,
);
}