forked from baron/baron-sso
Merge pull request '/login -> /signin 변경' (#69) from dev/passwd-tab-signup into main
Reviewed-on: ai-team/baron-sso#69
This commit is contained in:
@@ -22,7 +22,7 @@ class _ApproveQrScreenState extends State<ApproveQrScreen> {
|
||||
final session = Descope.sessionManager.session;
|
||||
if (session == null || session.refreshToken.isExpired) {
|
||||
setState(() => _message = "Please log in on your phone first.");
|
||||
context.go('/login'); // Redirect to login
|
||||
context.go('/signin'); // Redirect to login
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class _ApproveQrScreenState extends State<ApproveQrScreen> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: TextButton(
|
||||
onPressed: () => context.go('/login'),
|
||||
onPressed: () => context.go('/signin'),
|
||||
child: const Text("Login on this device first"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -87,7 +87,7 @@ class _ResetPasswordScreenState extends State<ResetPasswordScreen> {
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
context.go('/login');
|
||||
context.go('/signin');
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
|
||||
@@ -257,7 +257,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('회원가입 완료'),
|
||||
content: const Text('성공적으로 가입되었습니다.'),
|
||||
actions: [TextButton(onPressed: () => context.go('/login'), child: const Text('로그인하기'))],
|
||||
actions: [TextButton(onPressed: () => context.go('/signin'), child: const Text('로그인하기'))],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ final _router = GoRouter(
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
path: '/login',
|
||||
path: '/signin',
|
||||
builder: (context, state) {
|
||||
_routerLogger.info("Navigating to /login");
|
||||
_routerLogger.info("Navigating to /signin");
|
||||
return const LoginScreen();
|
||||
}
|
||||
),
|
||||
@@ -159,7 +159,7 @@ final _router = GoRouter(
|
||||
final path = state.uri.path;
|
||||
|
||||
// Public paths that don't require login
|
||||
final isPublicPath = path == '/login' ||
|
||||
final isPublicPath = path == '/signin' ||
|
||||
path == '/signup' ||
|
||||
path.startsWith('/verify/') ||
|
||||
path == '/approve' ||
|
||||
@@ -173,15 +173,15 @@ final _router = GoRouter(
|
||||
return null;
|
||||
}
|
||||
|
||||
// If not logged in and trying to access a protected page, redirect to /login
|
||||
// If not logged in and trying to access a protected page, redirect to /signin
|
||||
if (!isLoggedIn) {
|
||||
_routerLogger.info("Not logged in, redirecting to /login");
|
||||
return '/login';
|
||||
_routerLogger.info("Not logged in, redirecting to /signin");
|
||||
return '/signin';
|
||||
}
|
||||
|
||||
// If logged in and trying to access login page, redirect to root (dashboard)
|
||||
// This is now implicitly handled by the isPublicPath check, but kept for clarity.
|
||||
// if (isLoggedIn && path == '/login') {
|
||||
// if (isLoggedIn && path == '/signin') {
|
||||
// _routerLogger.info("Logged in, redirecting to /");
|
||||
// return '/';
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user