Added Localizations and ran small fixes
This commit is contained in:
18
frontend/pweb/lib/services/auth.dart
Normal file
18
frontend/pweb/lib/services/auth.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
class AuthenticationService {
|
||||
Future<bool> verifyTwoFactorCode(String code) async {
|
||||
await Future.delayed(const Duration(seconds: 2));
|
||||
|
||||
if (code == '000000') {
|
||||
return true;
|
||||
} else {
|
||||
throw const WrongCodeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class WrongCodeException implements Exception {
|
||||
const WrongCodeException();
|
||||
|
||||
@override
|
||||
String toString() => 'WrongCodeException';
|
||||
}
|
||||
Reference in New Issue
Block a user