successMessage static method

String successMessage({
  1. required String? email,
  2. String? keyName,
})

Pure — email and keyName only, no apiKey/rawKey parameter, so the signature itself is why this can't print a raw key. The "never writes the raw key to stdout" claim rests on that plus run() reaching this only via AppLogger.success(successMessage(...)) in _loginWithKey/_loginWithPassword above — never a raw string interpolating rawKey/result.apiKey — both verified by reading, not by this function's own tests, which pin its formatting instead.

Implementation

static String successMessage({required String? email, String? keyName}) {
  final who = email ?? 'this account';
  return keyName == null
      ? 'Logged in as $who'
      : 'Logged in as $who ($keyName)';
}