forked from baron/baron-sso
Baron 통합로그인 -> Baron 로그인 명칭 변경
This commit is contained in:
@@ -249,7 +249,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
try {
|
||||
final parts = jwt.split('.');
|
||||
if (parts.length != 3) return 'User';
|
||||
|
||||
|
||||
final payload = utf8.decode(base64Url.decode(base64Url.normalize(parts[1])));
|
||||
final data = json.decode(payload);
|
||||
return data['name'] ?? data['email'] ?? data['sub'] ?? 'User';
|
||||
@@ -737,9 +737,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
loginId = '+82${loginId.substring(1)}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
debugPrint("[Auth] Initiating Enchanted Link for: $loginId");
|
||||
|
||||
|
||||
try {
|
||||
await _startEnchantedFlow(loginId, isEmail: input.contains('@'));
|
||||
} catch (e) {
|
||||
@@ -826,7 +826,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
|
||||
try {
|
||||
final result = await AuthProxyService.pollEnchantedLink(pendingRef);
|
||||
|
||||
|
||||
if (result['error'] == 'slow_down') {
|
||||
final interval = result['interval'];
|
||||
if (interval is int && interval > 0) {
|
||||
@@ -904,7 +904,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
final decodedPayload = base64Url.decode(base64Url.normalize(parts[1]));
|
||||
final payloadJson = utf8.decode(decodedPayload);
|
||||
final data = json.decode(payloadJson) as Map<String, dynamic>;
|
||||
|
||||
|
||||
final accessExpValue = data['exp'] as num?;
|
||||
final accessExp = accessExpValue != null
|
||||
? DateTime.fromMillisecondsSinceEpoch(accessExpValue.toInt() * 1000)
|
||||
@@ -923,7 +923,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
|
||||
void _onLoginSuccess(String token, {String? provider}) async {
|
||||
if (!mounted) return;
|
||||
|
||||
|
||||
_logTokenDetails(token);
|
||||
|
||||
final providerName = provider ?? AuthTokenStore.getProvider();
|
||||
@@ -1028,7 +1028,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
"Baron 통합로그인",
|
||||
"Baron 로그인",
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -1110,7 +1110,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16.0),
|
||||
child: Column(
|
||||
@@ -1275,7 +1275,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
_qrRemainingSeconds > 0
|
||||
_qrRemainingSeconds > 0
|
||||
? "남은 시간: ${_formatTime(_qrRemainingSeconds)}"
|
||||
: "QR 코드 만료됨",
|
||||
textAlign: TextAlign.center,
|
||||
@@ -1291,7 +1291,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
style: TextStyle(color: Colors.grey, fontSize: 12),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: _startQrFlow,
|
||||
onPressed: _startQrFlow,
|
||||
child: const Text("QR 코드 새로고침")
|
||||
),
|
||||
],
|
||||
|
||||
@@ -801,10 +801,10 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
|
||||
String _appLabelForPath(String path) {
|
||||
if (path.startsWith('/api/v1/auth')) {
|
||||
return 'Baron 통합로그인';
|
||||
return 'Baron 로그인';
|
||||
}
|
||||
if (path.startsWith('/api/v1/user')) {
|
||||
return 'Baron 통합로그인';
|
||||
return 'Baron 로그인';
|
||||
}
|
||||
if (path.startsWith('/api/v1/dev')) {
|
||||
return 'Dev Console';
|
||||
@@ -812,7 +812,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
if (path.startsWith('/api/v1/admin')) {
|
||||
return 'Admin Console';
|
||||
}
|
||||
return 'Baron 통합로그인';
|
||||
return 'Baron 로그인';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -831,7 +831,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
backgroundColor: _subtle,
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Baron 통합로그인',
|
||||
'Baron 로그인',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
elevation: 0,
|
||||
@@ -890,7 +890,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
const SizedBox(height: 12),
|
||||
_buildPastRps(isMobile),
|
||||
const SizedBox(height: 28),
|
||||
_buildSectionTitle('접속이력', 'Baron 통합로그인 기준의 최근 접근 기록입니다.'),
|
||||
_buildSectionTitle('접속이력', 'Baron 로그인 기준의 최근 접근 기록입니다.'),
|
||||
const SizedBox(height: 12),
|
||||
_buildAccessHistory(timelineWide),
|
||||
],
|
||||
@@ -1041,7 +1041,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const SizedBox(height: 40, child: Center(child: CircularProgressIndicator()));
|
||||
}
|
||||
|
||||
|
||||
final pastItems = (snapshot.data ?? []).where((h) => h.status != 'active').toList();
|
||||
if (pastItems.isEmpty) {
|
||||
return Column(
|
||||
@@ -1078,7 +1078,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
final lastAuthLabel = rp.lastAuthenticatedAt != null
|
||||
? _formatDateTime(rp.lastAuthenticatedAt!)
|
||||
: '연동됨';
|
||||
|
||||
|
||||
final normalizedStatus = rp.status.toLowerCase();
|
||||
final statusLabel = isRevoked ? '비활성' : (normalizedStatus.isEmpty || normalizedStatus == 'active' ? '활성' : '비활성');
|
||||
final name = rp.name.isNotEmpty ? rp.name : rp.id;
|
||||
@@ -1150,7 +1150,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
final statusColor = isActive ? Colors.green : Colors.grey;
|
||||
final borderColor = isActive ? Colors.green.withOpacity(0.5) : _border;
|
||||
final borderWidth = isActive ? 1.5 : 1.0;
|
||||
|
||||
|
||||
// 활성 상태면 클릭 가능 (URL 유무와 관계없이)
|
||||
final isClickable = isActive;
|
||||
|
||||
|
||||
@@ -971,7 +971,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||
backgroundColor: _subtle,
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Baron 통합로그인',
|
||||
'Baron 로그인',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
elevation: 0,
|
||||
|
||||
@@ -39,7 +39,7 @@ Future<void> _loadBundledFonts() async {
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
usePathUrlStrategy();
|
||||
|
||||
|
||||
// 1. Global Error Handling
|
||||
FlutterError.onError = (details) {
|
||||
FlutterError.presentError(details);
|
||||
@@ -90,7 +90,7 @@ final _router = GoRouter(
|
||||
builder: (context, state) => const ProfilePage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/signin',
|
||||
path: '/signin',
|
||||
builder: (context, state) {
|
||||
final loginChallenge = state.uri.queryParameters['login_challenge'];
|
||||
_routerLogger.info("Navigating to /signin with login_challenge: $loginChallenge");
|
||||
@@ -179,7 +179,7 @@ final _router = GoRouter(
|
||||
path: '/reset-password',
|
||||
builder: (context, state) {
|
||||
// For deep linking, you might pass the token in the path, e.g., /reset-password/:token
|
||||
// final token = state.pathParameters['token'];
|
||||
// final token = state.pathParameters['token'];
|
||||
_routerLogger.info("Navigating to /reset-password");
|
||||
return const ResetPasswordScreen();
|
||||
},
|
||||
@@ -244,13 +244,13 @@ final _router = GoRouter(
|
||||
final path = state.uri.path;
|
||||
|
||||
// Public paths that don't require login
|
||||
final isPublicPath = path == '/signin' ||
|
||||
final isPublicPath = path == '/signin' ||
|
||||
path == '/signup' ||
|
||||
path == '/login' ||
|
||||
path == '/registration' ||
|
||||
path == '/verify' ||
|
||||
path == '/verification' ||
|
||||
path.startsWith('/verify/') ||
|
||||
path.startsWith('/verify/') ||
|
||||
path == '/approve' ||
|
||||
path.startsWith('/ql/') ||
|
||||
path == '/forgot-password' ||
|
||||
@@ -295,7 +295,7 @@ class BaronSSOApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp.router(
|
||||
title: 'Baron 통합로그인',
|
||||
title: 'Baron 로그인',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: const Color(0xFF1A1F2C), // Dark Navy/Black base
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
@@ -14,26 +14,29 @@
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="/">
|
||||
<base href="/" />
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
<meta charset="UTF-8" />
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
|
||||
<meta name="description" content="A new Flutter project." />
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="Baron 통합로그인">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||
<meta name="apple-mobile-web-app-title" content="Baron 로그인" />
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png" />
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
|
||||
<title>Baron 통합로그인</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
<title>Baron 로그인</title>
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "Baron 통합로그인",
|
||||
"short_name": "Baron 통합로그인",
|
||||
"name": "Baron 로그인",
|
||||
"short_name": "Baron 로그인",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "Baron 통합로그인 사용자 포털.",
|
||||
"description": "Baron 로그인 사용자 포털.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
|
||||
Reference in New Issue
Block a user