auth<T> method

T? auth<T>({
  1. String? key,
})

Returns an instance of the auth user.

Implementation

T? auth<T>({String? key}) {
  String storageKey = getEnv('AUTH_USER_KEY', defaultValue: 'AUTH_USER');
  if (key != null) {
    storageKey = key;
  }
  if (!_values.containsKey(storageKey)) {
    return null;
  }
  return _values[storageKey];
}