1
0
forked from baron/baron-sso

style(userfront): format flutter files to satisfy CI

This commit is contained in:
2026-04-21 18:06:57 +09:00
parent 797e6cc90a
commit 750776f0a0
3 changed files with 9 additions and 7 deletions

View File

@@ -92,7 +92,10 @@ class AuthProxyService {
}
}
static Future<Map<String, dynamic>> getMe({String? token, bool useCookie = true}) async {
static Future<Map<String, dynamic>> getMe({
String? token,
bool useCookie = true,
}) async {
final url = Uri.parse('$_baseUrl/api/v1/user/me');
final client = createHttpClient(withCredentials: useCookie);
try {
@@ -100,10 +103,7 @@ class AuthProxyService {
if (!useCookie && token != null && token.isNotEmpty) {
headers['Authorization'] = 'Bearer $token';
}
final response = await client.get(
url,
headers: headers,
);
final response = await client.get(url, headers: headers);
if (response.statusCode == 200) {
return jsonDecode(response.body);

View File

@@ -352,7 +352,8 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
// IMPORTANT: If backend returned a token during OIDC flow, save it to fix login state.
final jwt = res['sessionJwt'] ?? res['token'] ?? token;
if (jwt != null && jwt.isNotEmpty) {
final provider = res['provider'] as String? ?? AuthTokenStore.getProvider();
final provider =
res['provider'] as String? ?? AuthTokenStore.getProvider();
await AuthNotifier.instance.onLoginSuccess(jwt, provider: provider);
}

View File

@@ -98,7 +98,8 @@ Future<void> _silentSessionRecovery() async {
);
// For cookie-based auth, we don't necessarily have a JWT in local storage,
// but AuthNotifier needs to know we are logged in.
final jwt = userInfo['sessionJwt'] ?? userInfo['token'] ?? 'cookie-session';
final jwt =
userInfo['sessionJwt'] ?? userInfo['token'] ?? 'cookie-session';
await AuthNotifier.instance.onLoginSuccess(jwt);
_log.info("[SessionRecovery] Recovery complete. Subject: $subject");
} else {