안드로이드에서 Supabase Google 로그인
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 지시를 복사하기.
소개
소개이 안내서에서는 Android에서 Google Sign-In을 Supabase Authentication과 통합하는 방법을 설명합니다. 이미 완료한 것으로 가정합니다:
- Google Login Android 설정 Supabase Google Login - 일반 설정
- Implementation Implementation.
구현은 예제 앱의
complete implementationcomplete implementation complete implementation supabaseAuthUtils.ts 파일. 이 안내서에서는 주요 개념과 사용 방법을 설명합니다.
인증 도우미 사용
제목 “인증 도우미 사용”The authenticateWithGoogleSupabase 함수는 인증 흐름의 모든 단계를 처리합니다.
import { authenticateWithGoogleSupabase } from './supabaseAuthUtils';
const result = await authenticateWithGoogleSupabase();if (result.success) { console.log('Signed in:', result.user); // Navigate to your authenticated area} else { console.error('Error:', result.error);}작동 방식
제목 “작동 방식”인증 흐름의 세부 설명을 원한다면, nonce 생성, JWT 검증, Supabase 로그인에 대한 정보는 일반 설정 안내서의 "작동 방식" 섹션을 참조하세요. 완전한 __CAPGO_KEEP_0__ 참조를 원한다면, 일반 설정 안내서의 "__CAPGO_KEEP_0__ 참조" 섹션을 참조하세요..
For the complete code reference, see the Complete Code Reference section in the General Setup guide.
중요한 참고 사항
중요한 참고 사항 섹션Nonce 처리
Nonce 처리 섹션Nonce 구현은 React Native Google Sign In 문서에서 설명하는 패턴을 따릅니다. Supabase로 이동:
rawNonceSupabase는signInWithIdToken()- 해시를 생성
rawNonce해시와nonceDigestGoogle Sign-In에서 제공하는 ID 토큰의 nonceDigest(SHA-256 해시, 16진수 인코딩)으로 이동nonceGoogle Sign-In API의
__CAPGO_KEEP_0__
__CAPGO_KEEP_1____CAPGO_KEEP_2__
- __CAPGO_KEEP_3__
- __CAPGO_KEEP_4__
- __CAPGO_KEEP_5__
__CAPGO_KEEP_6__
__CAPGO_KEEP_7____CAPGO_KEEP_8__
- __CAPGO_KEEP_9____CAPGO_KEEP_10__
- __CAPGO_KEEP_11__: 콘솔 로그를 확인하세요 - 함수는 자동으로 다시 시도하지만 필요 시 로그아웃을 수동으로 먼저 해보세요
- 토큰 유효성 검사 실패: __CAPGO_KEEP_0__ 예제 앱을 참조하여
mode: 'online'initialize 호출에서 idToken을 얻기 위해 - 사용 중인 경우 example app code Supabase Google Login on Android를 사용하여 인증 및 계정 흐름을 계획하고 연결하세요
Supabase Google Login on Android
Section titled “Keep going from Supabase Google Login on Android”Keep going from Supabase Google Login on Android If you are using to plan authentication and account flows, connect it with Using @capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.