안내서
Firebase 인증에 대한 튜토리얼
capgo의 capacitor-firebase-authentication을 사용하는 방법
Capacitor의 Firebase 인증 플러그인
설치
bun add @capgo/capacitor-firebase-authentication
bunx cap sync
이 플러그인이 노출하는 것
applyActionCode- 이메일로 받은 인증 code을 적용합니다.confirmPasswordReset- 비밀번호 초기화 과정을 완료합니다.confirmVerificationCode- 휴대폰 인증 과정을 완료합니다.createUserWithEmailAndPassword- 이메일과 비밀번호를 사용하여 새로운 사용자 계정을 만듭니다. 새로운 계정이 생성된 경우, 사용자는 자동으로 로그인됩니다.
예시 사용
applyActionCode
code 이메일로 보낸 인증 코드를 적용합니다.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.applyActionCode({} as ApplyActionCodeOptions);
confirmPasswordReset
비밀번호 초기화 과정을 완료합니다.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmPasswordReset({} as ConfirmPasswordResetOptions);
confirmVerificationCode
전화번호 인증 과정을 완료합니다.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.confirmVerificationCode({} as ConfirmVerificationCodeOptions);
createUserWithEmailAndPassword
이메일과 비밀번호를 사용하여 새로운 사용자 계정을 생성합니다. 새로운 계정이 생성되면 사용자는 자동으로 로그인됩니다.
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.createUserWithEmailAndPassword({} as CreateUserWithEmailAndPasswordOptions);
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/authentication
- 문서: /docs/plugins/firebase-authentication/