로그인 · 회원가입 흐름을 서버 계정·약관 동의와 연결
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
/// 화면은 이걸 안내 다이얼로그로 보여 준다.
|
||||
library;
|
||||
|
||||
import '../../core/i18n/app_locale.dart';
|
||||
|
||||
/// 로그인 수단 — **별첨 B v1.4 확정값**.
|
||||
///
|
||||
/// > 1차 로그인은 Google / Apple / Kakao / LINE 4종입니다. 이메일/비밀번호 가입 및
|
||||
@@ -16,20 +18,18 @@ library;
|
||||
/// 때문이다 — 사용자에게 노출되는 목록([AuthRepository.providers])에는 들어가지
|
||||
/// 않는다. X(트위터)는 확정 목록에 없어 값 자체를 두지 않는다.
|
||||
enum AuthProviderKind {
|
||||
email('이메일로 시작하기', '이메일'),
|
||||
kakao('카카오로 시작하기', '카카오'),
|
||||
line('LINE으로 시작하기', 'LINE'),
|
||||
apple('Apple로 시작하기', 'Apple'),
|
||||
google('Google로 시작하기', 'Google');
|
||||
|
||||
const AuthProviderKind(this.label, this.shortName);
|
||||
email,
|
||||
kakao,
|
||||
line,
|
||||
apple,
|
||||
google;
|
||||
|
||||
/// 버튼 라벨. 임의로 바꾸지 마라 — 화면 대조 대상이다.
|
||||
final String label;
|
||||
String get label => appL10n.authProviderStart(name);
|
||||
|
||||
/// 제공자 이름만 — 설정 「SNS 연동」·안내 문구용. [label] 에서 「로 시작하기」를
|
||||
/// 떼어 만들면 「LINE으로」가 「LINE으」로 잘린다(인계 결함).
|
||||
final String shortName;
|
||||
String get shortName => appL10n.authProviderName(name);
|
||||
|
||||
/// 이메일은 소셜이 아니라 입력 폼이 붙는다. QA 내부 경로만 이걸 쓴다.
|
||||
bool get needsForm => this == AuthProviderKind.email;
|
||||
@@ -194,7 +194,7 @@ final class SampleAccountLinker implements AccountLinker {
|
||||
@override
|
||||
Future<AuthOutcome> unlink(AuthProviderKind provider) async {
|
||||
if (_linked.length <= 1) {
|
||||
return const AuthFailed('E-AUTH-13', '마지막 로그인 수단은 연결을 해제할 수 없습니다.');
|
||||
return AuthFailed('E-AUTH-13', appL10n.authLastProvider);
|
||||
}
|
||||
_linked.remove(provider);
|
||||
return AuthSucceeded(
|
||||
|
||||
Reference in New Issue
Block a user