forked from baron/baron-sso
fix(auth): 비밀번호 재설정 리다이렉트 언어 보정 및 로그인 상태별 분기 차단
1. 백엔드 ProcessPasswordResetToken 리다이렉션 경로에 최우선 선호 로케일 주소(ko/en) 동적 생성 적용 (레이스 컨디션 방지 및 로딩 갇힘 해결) 2. ForgotPasswordScreen 발송 성공 후 빈 네비게이터 팝 현상 제거 (GoRouter context.pop() 및 context.go() 사용) 3. 로그인 후 화면(내정보 프로필 페이지)에서 불필요한 비밀번호 분실 버튼 제거 정책 반영
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import '../../../core/i18n/locale_utils.dart';
|
||||
import '../../../core/services/auth_token_store.dart';
|
||||
import '../../../core/services/auth_proxy_service.dart';
|
||||
import '../../../core/ui/toast_service.dart';
|
||||
import 'package:userfront/i18n.dart';
|
||||
@@ -48,7 +51,17 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
|
||||
);
|
||||
if (mounted) {
|
||||
ToastService.success(tr('msg.userfront.forgot.sent'));
|
||||
Navigator.of(context).pop();
|
||||
if (context.canPop()) {
|
||||
context.pop();
|
||||
} else {
|
||||
final isLoggedIn = AuthTokenStore.hasToken();
|
||||
final localeCode = extractLocaleFromPath(Uri.base) ?? resolvePreferredLocaleCode();
|
||||
if (isLoggedIn) {
|
||||
context.go('/$localeCode/profile');
|
||||
} else {
|
||||
context.go('/$localeCode/signin');
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
|
||||
Reference in New Issue
Block a user