로그인 타입 설정 개선 및 생체인증 등록 플로우 수정

- registerBiometric으로 변경하고 bottomsheet 닫은 후 생체인증 팝업 표시
- ID 로그인 선택 시 네이티브 setLoginType AppBridge 호출 추가
- 생체인증 등록 완료 후 로그인 타입 재조회하여 설정 화면 갱신
- SET_LOGIN_TYPE 브릿지 메시지 타입 및 관련 메서드 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-10-28 15:38:02 +09:00
parent b06424fe1b
commit 0ac2714a07
5 changed files with 34 additions and 6 deletions

View File

@@ -8,16 +8,17 @@ export interface LoginTypeBottomSheetProps {
setLoginTypeBottomSheetOn: (loginTypeBottomSheetOn: boolean) => void;
loginType: LoginType;
setLoginType: (loginType: string) => void;
onBiometricRegistered?: () => void;
};
export const LoginTypeBottomSheet = ({
loginTypeBottomSheetOn,
setLoginTypeBottomSheetOn,
loginType,
setLoginType
setLoginType,
onBiometricRegistered
}: LoginTypeBottomSheetProps) => {
const { t } = useTranslation();
const { openBiometricRegistrationPopup } = useAppBridge();
const { registerBiometric, setLoginType: setLoginTypeNative } = useAppBridge();
const onClickToClose = () => {
setLoginTypeBottomSheetOn(false);
@@ -25,12 +26,21 @@ export const LoginTypeBottomSheet = ({
const onChangeLoginType = async (type: string) => {
if (loginType !== type) {
if (type === 'BIOMETRIC') {
await openBiometricRegistrationPopup();
onClickToClose();
registerBiometric().then(() => {
onBiometricRegistered?.();
}).catch(() => {
// 에러 처리
});
} else {
setLoginType(type);
setLoginTypeNative(type).then(() => {
setLoginType(type);
onClickToClose();
}).catch(() => {
onClickToClose();
});
}
}
onClickToClose();
};
return (