Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
auth_exception.dart
Go to the documentation of this file.
1import 'app_exception.dart';
2
5 required super.message,
6 super.code,
7 super.details,
8 });
9
10 factory AuthException.invalidCredentials() {
11 return const AuthException(
12 message: 'Invalid credentials',
13 code: 'AUTH_INVALID_CREDENTIALS',
14 );
15 }
16
17 factory AuthException.userNotFound() {
18 return const AuthException(
19 message: 'User not found',
20 code: 'AUTH_USER_NOT_FOUND',
21 );
22 }
23
24 factory AuthException.emailAlreadyInUse() {
25 return const AuthException(
26 message: 'Email already in use',
27 code: 'AUTH_EMAIL_IN_USE',
28 );
29 }
30
31 factory AuthException.weakPassword() {
32 return const AuthException(
33 message: 'Password is too weak',
34 code: 'AUTH_WEAK_PASSWORD',
35 );
36 }
37
38 factory AuthException.sessionExpired() {
39 return const AuthException(
40 message: 'Session expired',
41 code: 'AUTH_SESSION_EXPIRED',
42 );
43 }
44}
const AuthException({ required super.message, super.code, super.details, })
final String message
Definition failures.dart:0