Skip to content

Commit f5815d3

Browse files
committed
feat(auth): Configure email link sign-in
- Added ActionCodeSettings - Configured dynamic link domain - Specified bundle/package IDs
1 parent 990201a commit f5815d3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

lib/main.dart

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'package:ht_authentication_repository/ht_authentication_repository.dart';
77
import 'package:ht_headlines_firestore/ht_headlines_firestore.dart';
88
import 'package:ht_headlines_repository/ht_headlines_repository.dart';
99
import 'package:ht_main/app/app.dart';
10-
// No longer importing AppBloc here
1110
import 'package:ht_main/bloc_observer.dart';
1211
import 'package:ht_main/firebase_options.dart';
1312

@@ -18,7 +17,21 @@ void main() async {
1817

1918
// --- Instantiate Repositories ---
2019
// 1. Authentication Repository
21-
final authenticationClient = HtAuthenticationFirebase();
20+
// Define ActionCodeSettings for email link sign-in
21+
final actionCodeSettings = ActionCodeSettings(
22+
// IMPORTANT: Replace with your actual Firebase Dynamic Link domain/setup
23+
url: 'https://htmain.page.link/finishLogin',
24+
handleCodeInApp: true,
25+
// IMPORTANT: Replace with your actual bundle/package IDs
26+
iOSBundleId: 'com.example.htMain', // Example ID
27+
androidPackageName: 'com.example.ht_main', // Example ID
28+
androidInstallApp: true,
29+
androidMinimumVersion: '12', // Optional: Specify minimum Android version
30+
);
31+
32+
final authenticationClient = HtAuthenticationFirebase(
33+
actionCodeSettings: actionCodeSettings,
34+
);
2235
final authenticationRepository = HtAuthenticationRepository(
2336
authenticationClient: authenticationClient,
2437
);

0 commit comments

Comments
 (0)