1
0
forked from baron/baron-sso

QR 스캔 뒤로가기 fallback 추가로 진입 복귀 보장

This commit is contained in:
2026-03-19 13:39:12 +09:00
parent 44231b1c2e
commit c8291da699
3 changed files with 31 additions and 2 deletions

View File

@@ -15,3 +15,14 @@ String buildQrApprovePath(
);
return '/$resolvedLocale/approve?ref=${Uri.encodeQueryComponent(value)}';
}
String buildQrBackFallbackPath({String? localeCode, Uri? currentUri}) {
final explicitLocale = localeCode?.trim();
final uri = currentUri ?? Uri.base;
final resolvedLocale = explicitLocale != null && explicitLocale.isNotEmpty
? explicitLocale.toLowerCase().replaceAll('_', '-')
: normalizeLocaleCode(
extractLocaleFromPath(uri) ?? resolvePreferredLocaleCode(),
);
return '/$resolvedLocale/dashboard';
}