Integrate email notifications into signup and login (#38)
This commit is contained in:
1 parent
326d58f705
commit
ad5a061164
55 files changed
+1859
-3464
No files matched your search
@@ -19,12 +19,23 @@ import '../workspace/shell.dart';
|
||||
import '../workspace/transfer.dart';
|
||||
import 'routes.dart';
|
||||
|
||||
GoRouter createAppRouter() {
|
||||
GoRouter createAppRouter({bool Function()? authenticated}) {
|
||||
final topUpKey = GlobalKey<TransferPageState>();
|
||||
final exchangeKey = GlobalKey<TransferPageState>();
|
||||
final payoutKey = GlobalKey<TransferPageState>();
|
||||
final identityKey = GlobalKey<IdentityPageState>();
|
||||
return GoRouter(
|
||||
redirect: (context, state) {
|
||||
if (authenticated == null || authenticated()) return null;
|
||||
final path = state.uri.path;
|
||||
if (path == '/' ||
|
||||
path == '/verify-email' ||
|
||||
path == '/verification-sent' ||
|
||||
path == '/two-factor') {
|
||||
return null;
|
||||
}
|
||||
return '/';
|
||||
},
|
||||
// Signup email is an in-memory navigation extra, never browser-history data.
|
||||
extraCodec: const _TransientExtras(),
|
||||
routes: [
|
||||
|
||||
Reference in new issue
Block a user