로그인을 Figma 2단계(로그인 → 간편 로그인)로 · 회원가입 · 약관 동의 · 가입 완료 화면

This commit is contained in:
Sn-Kinos
2026-09-27 21:22:02 +09:00
parent 388ea4227c
commit 735bdb76b3
14 changed files with 729 additions and 218 deletions
+17 -12
View File
@@ -16,17 +16,21 @@ library;
/// 때문이다 — 사용자에게 노출되는 목록([AuthRepository.providers])에는 들어가지
/// 않는다. X(트위터)는 확정 목록에 없어 값 자체를 두지 않는다.
enum AuthProviderKind {
email('이메일로 시작하기'),
kakao('카카오로 시작하기'),
line('LINE으로 시작하기'),
apple('Apple로 시작하기'),
google('Google로 시작하기');
email('이메일로 시작하기', '이메일'),
kakao('카카오로 시작하기', '카카오'),
line('LINE으로 시작하기', 'LINE'),
apple('Apple로 시작하기', 'Apple'),
google('Google로 시작하기', 'Google');
const AuthProviderKind(this.label);
const AuthProviderKind(this.label, this.shortName);
/// 버튼 라벨. 임의로 바꾸지 마라 — 화면 대조 대상이다.
final String label;
/// 제공자 이름만 — 설정 「SNS 연동」·안내 문구용. [label] 에서 「로 시작하기」를
/// 떼어 만들면 「LINE으로」가 「LINE으」로 잘린다(인계 결함).
final String shortName;
/// 이메일은 소셜이 아니라 입력 폼이 붙는다. QA 내부 경로만 이걸 쓴다.
bool get needsForm => this == AuthProviderKind.email;
}
@@ -131,12 +135,13 @@ abstract interface class AuthSession {
/// 「동일 이메일만 연동 가능」 판정 — 명세 `554:22797` · 안내 문구 `554:23251`.
///
/// **로컬 파트만 비교한다.** 명세의 예시가 `test123@naver.com` 과
/// `test123@gmail.com` 을 같다고 보므로 도메인은 보지 않는다. 전체 문자열을
/// 비교하면 명세가 (O) 로 적은 사례가 막힌다.
bool sameAccountIdentity(String a, String b) => _localPart(a) == _localPart(b);
String _localPart(String email) => email.trim().toLowerCase().split('@').first;
/// **제공자가 인증한 이메일 전체**를 정규화(trim·소문자)해 비교한다(fzu-2z0.5).
/// 로컬 파트만 보면 `test123@naver.com` 과 `test123@gmail.com` 처럼 남의 계정이
/// 붙는다. 비었거나 `@` 가 없는 값은 이메일로 보지 않아 false.
bool sameAccountIdentity(String a, String b) {
final x = a.trim().toLowerCase();
return x.contains('@') && x == b.trim().toLowerCase();
}
/// 연동 화면에 거는 제공자 — 별첨 B v1.4 확정 4종.
/// 이메일은 QA 내부 경로라 목록에 없다.