forked from baron/baron-sso
namecard 연동
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:descope/descope.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'features/auth/presentation/login_screen.dart';
|
||||
import 'features/dashboard/presentation/dashboard_screen.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -21,7 +22,11 @@ void main() async {
|
||||
Descope.setup(projectId);
|
||||
|
||||
// Load saved session if any
|
||||
await Descope.sessionManager.loadSession();
|
||||
try {
|
||||
await Descope.sessionManager.loadSession();
|
||||
} catch (e) {
|
||||
debugPrint("Failed to load session: $e");
|
||||
}
|
||||
|
||||
runApp(const ProviderScope(child: BaronSSOApp()));
|
||||
}
|
||||
@@ -33,8 +38,7 @@ final _router = GoRouter(
|
||||
GoRoute(path: '/', builder: (context, state) => const LoginScreen()),
|
||||
GoRoute(
|
||||
path: '/dashboard',
|
||||
builder: (context, state) =>
|
||||
const Scaffold(body: Center(child: Text("Dashboard Placeholder"))),
|
||||
builder: (context, state) => const DashboardScreen(),
|
||||
),
|
||||
],
|
||||
redirect: (context, state) {
|
||||
|
||||
Reference in New Issue
Block a user