fixed reset password
This commit is contained in:
@@ -128,6 +128,30 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
_submit(), // Se lo supporti nel tuo widget custom
|
||||
),
|
||||
|
||||
// Link "Dimenticato password?" solo in Login mode
|
||||
if (state.isLoginMode) ...[
|
||||
const SizedBox(height: 8),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: isLoading
|
||||
? null
|
||||
: () => context
|
||||
.read<AuthCubit>()
|
||||
.requestPasswordReset(
|
||||
_emailController.text.trim(),
|
||||
),
|
||||
child: Text(
|
||||
context.l10n.authScreenForgotPassword,
|
||||
style: TextStyle(
|
||||
color: context.accent,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// --- BOTTONE PRINCIPALE ---
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flux/main.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
|
||||
class SetPasswordScreen extends StatefulWidget {
|
||||
@@ -63,7 +64,7 @@ class _SetPasswordScreenState extends State<SetPasswordScreen> {
|
||||
setState(() => _isSessionReady = true);
|
||||
}
|
||||
} catch (e) {
|
||||
print("Errore ripristino manuale sessione: $e");
|
||||
debugPrint("Errore ripristino manuale sessione: $e");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +99,7 @@ class _SetPasswordScreenState extends State<SetPasswordScreen> {
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
context.go('/');
|
||||
}
|
||||
} on AuthException catch (e) {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user