forked from baron/baron-sso
root page 변경
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('/'); // Redirect to login
|
||||
context.go('/login'); // Redirect to login
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class _ApproveQrScreenState extends State<ApproveQrScreen> {
|
||||
|
||||
// Automatically go to dashboard after a short delay
|
||||
Future.delayed(const Duration(seconds: 1), () {
|
||||
if (mounted) context.go('/dashboard');
|
||||
if (mounted) context.go('/');
|
||||
});
|
||||
} catch (e) {
|
||||
setState(() => _message = "Error: $e");
|
||||
@@ -103,14 +103,14 @@ class _ApproveQrScreenState extends State<ApproveQrScreen> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: TextButton(
|
||||
onPressed: () => context.go('/'),
|
||||
onPressed: () => context.go('/login'),
|
||||
child: const Text("Login on this device first"),
|
||||
),
|
||||
),
|
||||
|
||||
if (_success)
|
||||
FilledButton(
|
||||
onPressed: () => context.go('/dashboard'),
|
||||
onPressed: () => context.go('/'),
|
||||
child: const Text("Go to My Dashboard"),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -409,7 +409,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
// We call notify() to update the router's state, and go() to ensure navigation.
|
||||
AuthNotifier.instance.notify();
|
||||
if (mounted) {
|
||||
context.go('/dashboard');
|
||||
context.go('/');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class LoginSuccessScreen extends StatelessWidget {
|
||||
// 이 버튼이 QR 카메라를 켜는 버튼입니다.
|
||||
FilledButton.icon(
|
||||
onPressed: () {
|
||||
context.push('/qr-scan');
|
||||
context.push('/scan');
|
||||
},
|
||||
icon: const Icon(Icons.camera_alt, size: 28),
|
||||
label: const Text("QR 인증 (카메라 켜기)"),
|
||||
@@ -50,7 +50,7 @@ class LoginSuccessScreen extends StatelessWidget {
|
||||
const SizedBox(height: 24),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.go('/dashboard');
|
||||
context.go('/');
|
||||
},
|
||||
child: const Text("나중에 하기 (대시보드로 이동)", style: TextStyle(color: Colors.grey)),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user