첫 커밋: 로컬 프로젝트 업로드
This commit is contained in:
16
baron-sso/userfront/lib/core/notifiers/auth_notifier.dart
Normal file
16
baron-sso/userfront/lib/core/notifiers/auth_notifier.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import '../services/auth_token_store.dart';
|
||||
|
||||
class AuthNotifier extends ChangeNotifier {
|
||||
static final AuthNotifier instance = AuthNotifier();
|
||||
|
||||
Future<void> onLoginSuccess(String token, {String? provider}) async {
|
||||
AuthTokenStore.setToken(token, provider: provider);
|
||||
AuthTokenStore.clearPendingProvider();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void notify() {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user