We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e747f8 commit 0277752Copy full SHA for 0277752
lib/screens/auth/login_screen.dart
@@ -48,10 +48,15 @@ class _LoginFormState extends State<LoginForm> {
48
try {
49
final email = _emailController.text;
50
final password = _passwordController.text;
51
- await Supabase.instance.client.auth.signInWithPassword(
+ final authResponse =
52
+ await Supabase.instance.client.auth.signInWithPassword(
53
email: email,
54
password: password,
55
);
56
+ final id = authResponse.user?.id;
57
+ if (id != null) {
58
+ OneSignal.shared.setExternalUserId(id);
59
+ }
60
} catch (e) {
61
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
62
content: Text(e.toString() ?? "Login failed"),
0 commit comments