가입 시 약관 동의 단계 추가 — 필수·선택 항목 구분 · 개인정보처리방침 고지 · 동의 기록 저장
This commit is contained in:
@@ -210,13 +210,16 @@ class _SimpleLoginScreenState extends State<SimpleLoginScreen> {
|
||||
|
||||
Future<void> _signIn(SocialProvider provider) async {
|
||||
if (widget.signUp) {
|
||||
final agreed = await Navigator.of(
|
||||
context,
|
||||
).push<bool>(MaterialPageRoute(builder: (_) => const TermsScreen()));
|
||||
if (agreed != true || !mounted) return;
|
||||
final agreed = await Navigator.of(context).push<Set<String>>(
|
||||
MaterialPageRoute(builder: (_) => const TermsScreen()),
|
||||
);
|
||||
if (agreed == null || !mounted) return;
|
||||
// 인증 뒤 동의가 필요한 계정이면 이 동의를 서버에 기록한다(약관을 다시 묻지 않는다).
|
||||
widget.auth.pendingConsent = agreed;
|
||||
}
|
||||
setState(() => _busy = true);
|
||||
final outcome = await widget.auth.signIn(provider);
|
||||
if (outcome is! AuthSucceeded) widget.auth.pendingConsent = null;
|
||||
if (!mounted) return;
|
||||
setState(() => _busy = false);
|
||||
// 키 대기 제공자는 안내 다이얼로그로 끊는다 — 눌렀는데 아무 일도 안 일어나면
|
||||
@@ -266,7 +269,7 @@ class _SimpleLoginScreenState extends State<SimpleLoginScreen> {
|
||||
for (final kind in _figmaOrder)
|
||||
...widget.auth.providers.where((p) => p.provider == kind),
|
||||
];
|
||||
return Scaffold(
|
||||
final scaffold = Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
actions: [
|
||||
@@ -345,6 +348,7 @@ class _SimpleLoginScreenState extends State<SimpleLoginScreen> {
|
||||
),
|
||||
),
|
||||
);
|
||||
return scaffold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user