컨텐츠로 바로가기

__CAPGO_KEEP_5__

GitHub

설치

설치

AI 도움을 받는 설치를 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요:

터미널 창
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

다음과 같은 명령어를 사용하세요:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-authentication` plugin in my project.

만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:

터미널 창
bun add @capgo/capacitor-firebase-authentication
bunx cap sync
import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';

applyActionCode

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);

__CAPGO_KEEP_0__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.deleteUser();

fetchSignInMethodsForEmail

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.fetchSignInMethodsForEmail({} as FetchSignInMethodsForEmailOptions);

getCurrentUser

__CAPGO_KEEP_2__

__CAPGO_KEEP_4__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getCurrentUser();

getPendingAuthResult

__CAPGO_KEEP_5__

__CAPGO_KEEP_6__ SignInResult __CAPGO_KEEP_7__

__CAPGO_KEEP_8__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getPendingAuthResult();

getIdToken

getIdToken

현재 로그인한 사용자의 Firebase Auth ID 토큰을 가져옵니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getIdToken();

getIdTokenResult

getIdTokenResult

JSON Web Token (JWT)으로 사용자를 식별하는 데 사용되는 사용자 정보를 반환합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getIdTokenResult();

getRedirectResult

getRedirectResult

redirect-based sign-in flow에서 사용자에게 반환됩니다. SignInResult 사용자 인증이 실패한 경우 오류로 실패합니다. redirect operation이 호출되지 않은 경우 사용자를 null로 반환합니다.

__CAPGO_KEEP_0__ SignInResult __CAPGO_KEEP_0__

Only available for Web.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getRedirectResult();

getTenantId

getTenantId

테넌트 아이디를 가져옵니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.getTenantId();
isSignInWithEmailLink

이메일 링크로 로그인하는 incoming 링크가 맞는지 확인합니다. signInWithEmailLink.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.isSignInWithEmailLink({} as IsSignInWithEmailLinkOptions);

linkWithApple

linkWithApple

Apple 인증 제공자와 사용자 계정을 연결합니다.

로그인한 사용자가 native layer에 로그인되어 있어야 합니다. 이 설정 옵션은 여기서 효과가 없습니다. skipNativeAuth configuration option has no effect here.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithApple();

linkWithEmailAndPassword

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__ skipNativeAuth __CAPGO_KEEP_4__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithEmailAndPassword({} as LinkWithEmailAndPasswordOptions);
__CAPGO_KEEP_6__

__CAPGO_KEEP_7__

__CAPGO_KEEP_8__ skipNativeAuth __CAPGO_KEEP_9__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithEmailLink({} as LinkWithEmailLinkOptions);

linkWithFacebook

__CAPGO_KEEP_11__

Facebook 인증 제공자와 사용자 계정을 연결합니다.

native layer에서 로그인한 사용자만 사용할 수 있습니다. skipNativeAuth 이 설정 옵션은 여기에 영향을 미치지 않습니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithFacebook();

native layer에서 로그인한 사용자만 사용할 수 있습니다.

이 설정 옵션은 여기에 영향을 미치지 않습니다. skipNativeAuth iOS에서만 사용할 수 있습니다.

클립보드에 복사

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithGameCenter();

Links the user account with GitHub authentication provider.

로그인된 사용자가 필요합니다. skipNativeAuth 설정 옵션은 여기에 영향을 미치지 않습니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithGithub();

Google 인증 제공자와 사용자 계정을 연결합니다. 로그인된 사용자가 필요합니다. 설정 옵션은 여기에 영향을 미치지 않습니다.

클립보드에 복사 skipNativeAuth Microsoft 인증 제공자와 사용자 계정을 연결하는 섹션입니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithGoogle();

linkWithMicrosoft

클립보드에 복사

설정 옵션은 여기에 영향을 미치지 않습니다.

설정 옵션은 여기에 영향을 미치지 않습니다. skipNativeAuth 설정 옵션은 여기에 영향을 미치지 않습니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithMicrosoft();

linkWithOpenIdConnect

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithOpenIdConnect({} as LinkWithOpenIdConnectOptions);

linkWithPhoneNumber

__CAPGO_KEEP_1__

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__ __CAPGO_KEEP_5__ __CAPGO_KEEP_6__ skipNativeAuth __CAPGO_KEEP_7__

__CAPGO_KEEP_8__ phoneVerificationCompleted __CAPGO_KEEP_9__ phoneVerificationFailed __CAPGO_KEEP_10__ phoneCodeSent __CAPGO_KEEP_11__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithPhoneNumber({} as LinkWithPhoneNumberOptions);

linkWithPlayGames

linkWithPlayGames 제목

Play Games 인증 제공자와 사용자 계정을 연결합니다.

native layer에서 로그인한 상태여야 합니다. skipNativeAuth 이 설정 옵션은 여기에 영향을 미치지 않습니다.

Android에서만 사용할 수 있습니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithPlayGames();

linkWithTwitter

linkWithTwitter 제목

Twitter 인증 제공자와 사용자 계정을 연결합니다.

native layer에서 로그인한 상태여야 합니다. skipNativeAuth 이 설정 옵션은 여기에 영향을 미치지 않습니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithTwitter();

native layer에서 로그인한 상태여야 합니다.

설정 옵션은 이 경우 영향을 미치지 않습니다. skipNativeAuth 복사

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.linkWithYahoo();

reload

복사

Apple OAuth 액세스 토큰만 지원합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.reload();

복사

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.revokeAccessToken({} as RevokeAccessTokenOptions);

sendEmailVerification

복사

현재 로그인한 사용자에게 인증 이메일을 보냅니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendEmailVerification();

sendPasswordResetEmail

인증 이메일 전송하기

현재 로그인한 사용자에게 비밀번호 초기화 이메일을 보냅니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendPasswordResetEmail({} as SendPasswordResetEmailOptions);

이메일 링크를 사용하여 로그인 완료를 위해 호출하세요.

이메일 주소와 이메일 링크를 사용하여 로그인 링크를 호출하세요. signInWithEmailLink 클립보드에 복사

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.sendSignInLinkToEmail({} as SendSignInLinkToEmailOptions);

code

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setLanguageCode({} as SetLanguageCodeOptions);

setPersistence

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setPersistence({} as SetPersistenceOptions);

setTenantId

__CAPGO_KEEP_1__

__CAPGO_KEEP_3__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.setTenantId({} as SetTenantIdOptions);

signInAnonymously

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInAnonymously();

signInWithApple

__CAPGO_KEEP_1__

Apple 로그인 흐름을 시작합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithApple();

signInWithCustomToken

signInWithCustomToken

커스텀 토큰 로그인 흐름을 시작합니다.

이 메소드는 Android 및 iOS에서 사용할 수 없습니다. 이 경우 Firebase JS __CAPGO_KEEP_0__의 직접적인 인터페이스를 사용해야 합니다. skipNativeAuth 복사 signInWithCustomToken interface of the Firebase JS SDK directly.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithCustomToken({} as SignInWithCustomTokenOptions);

signInWithEmailAndPassword

복사

signInWithEmailLink

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithEmailAndPassword({} as SignInWithEmailAndPasswordOptions);
복사

이메일과 로그인 이메일 링크를 사용하여 로그인합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithEmailLink({} as SignInWithEmailLinkOptions);

Facebook 로그인 흐름을 시작합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithFacebook();

Game Center 로그인 흐름을 시작합니다.

iOS에서만 사용 가능합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithGameCenter();

GitHub 로그인 흐름을 시작합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithGithub();

signInWithGoogle

signInWithGoogle

Google 로그인 시작

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithGoogle();

signInWithMicrosoft

signInWithMicrosoft

Microsoft 로그인 시작

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithMicrosoft();

signInWithOpenIdConnect

signInWithOpenIdConnect

OpenID Connect 로그인 시작

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithOpenIdConnect({} as SignInWithOpenIdConnectOptions);

signInWithPhoneNumber

signInWithPhoneNumber

전화번호로 로그인

사용 phoneVerificationCompleted __CAPGO_KEEP_0__을 완료할 때 알림을 받을 수 있는 리스너입니다. __CAPGO_KEEP_1__를 사용하세요. phoneVerificationFailed __CAPGO_KEEP_0__이 실패했을 때 알림을 받을 수 있는 리스너입니다. __CAPGO_KEEP_1__를 사용하세요. phoneCodeSent __CAPGO_KEEP_0__ ID를 가져올 수 있는 리스너입니다.

안드로이드 및 iOS에서만 사용 가능합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithPhoneNumber({} as SignInWithPhoneNumberOptions);

signInWithPlayGames

signInWithPlayGames

Play Games 로그인 흐름을 시작합니다.

안드로이드에서만 사용 가능합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithPlayGames();

signInWithTwitter

signInWithTwitter

Twitter 로그인 흐름을 시작합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithTwitter();

__CAPGO_KEEP_0__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signInWithYahoo();

__CAPGO_KEEP_0__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.signOut();

__CAPGO_KEEP_0__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.unlink({} as UnlinkOptions);

__CAPGO_KEEP_0__

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateEmail({} as UpdateEmailOptions);

현재 로그인한 사용자의 비밀번호를 업데이트합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updatePassword({} as UpdatePasswordOptions);

사용자의 프로필 데이터를 업데이트합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.updateProfile({} as UpdateProfileOptions);

Sets the user-facing language code to be the default app language.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useAppLanguage();

앱을 사용하여 인증 에뮬레이터와 통신합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.useEmulator({} as UseEmulatorOptions);

verifyBeforeUpdateEmail

verifyBeforeUpdateEmail

현재 로그인한 사용자의 이메일 주소를 업데이트하기 전에 새로운 이메일 주소를 확인합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.verifyBeforeUpdateEmail({} as VerifyBeforeUpdateEmailOptions);

checkAppTrackingTransparencyPermission

checkAppTrackingTransparencyPermission

앱 추적 투명성의 현재 상태를 확인합니다.

Only available on iOS.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.checkAppTrackingTransparencyPermission();

requestAppTrackingTransparencyPermission

checkAppTrackingTransparencyPermission

앱 추적 투명성의 시스템 대화창을 열어 사용자에게 권한을 요청합니다.

주의: 사용자는 장치 설정에서 추적 요청을 비활성화 할 수 있습니다. 자세한 내용은 Apple의 문서를 참조하세요..

iOS에서만 사용 가능합니다.

import { FirebaseAuthentication } from '@capgo/capacitor-firebase-authentication';
await FirebaseAuthentication.requestAppTrackingTransparencyPermission();
export interface ApplyActionCodeOptions {
/**
* A verification code sent to the user.
*
* @since 0.2.2
*/
oobCode: string;
}
export interface ConfirmPasswordResetOptions {
/**
* A verification code sent to the user.
*
* @since 0.2.2
*/
oobCode: string;
/**
* The new password.
*
* @since 0.2.2
*/
newPassword: string;
}

ConfirmVerificationCodeOptions

ConfirmVerificationCodeOptions 제목 섹션
export interface ConfirmVerificationCodeOptions {
/**
* The verification ID received from the `phoneCodeSent` listener.
*
* The `verificationCode` option must also be provided.
*
* @since 5.0.0
*/
verificationId: string;
/**
* The verification code either received from the `phoneCodeSent` listener or entered by the user.
*
* The `verificationId` option must also be provided.
*
* @since 5.0.0
*/
verificationCode: string;
}
export interface SignInResult {
/**
* The currently signed-in user, or null if there isn't any.
*
* @since 0.1.0
*/
user: User | null;
/**
* Credentials returned by an auth provider.
*
* @since 0.1.0
*/
credential: AuthCredential | null;
/**
* Additional user information from a federated identity provider.
*
* @since 0.5.1
*/
additionalUserInfo: AdditionalUserInfo | null;
}

CreateUserWithEmailAndPasswordOptions

CreateUserWithEmailAndPasswordOptions 섹션 제목
export interface CreateUserWithEmailAndPasswordOptions {
/**
* @since 0.2.2
*/
email: string;
/**
* @since 0.2.2
*/
password: string;
}

FetchSignInMethodsForEmailOptions

FetchSignInMethodsForEmailOptions 섹션 제목
export interface FetchSignInMethodsForEmailOptions {
/**
* The user's email address.
*
* @since 6.0.0
*/
email: string;
}

FetchSignInMethodsForEmailResult

FetchSignInMethodsForEmailResult 섹션 제목
export interface FetchSignInMethodsForEmailResult {
/**
* The sign-in methods for the specified email address.
*
* This list is empty when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection)
* is enabled, irrespective of the number of authentication methods available for the given email.
*
* @since 6.0.0
*/
signInMethods: string[];
}
export interface GetCurrentUserResult {
/**
* The currently signed-in user, or null if there isn't any.
*
* @since 0.1.0
*/
user: User | null;
}
export interface GetIdTokenOptions {
/**
* Force refresh regardless of token expiration.
*
* @since 0.1.0
*/
forceRefresh: boolean;
}
export interface GetIdTokenResult {
/**
* The Firebase Auth ID token JWT string.
*
* @since 0.1.0
*/
token: string;
}

GetIdTokenResultOptions

GetIdTokenResultOptions
export interface GetIdTokenResultOptions {
/**
* Force refresh regardless of token expiration.
*
* @since 7.4.0
*/
forceRefresh: boolean;
}

GetIdTokenResultResult

GetIdTokenResultResult
export interface GetIdTokenResultResult {
/**
* The authentication time in milliseconds since the epoch.
*
* This is the time the user authenticated (signed in) and not the time the token was refreshed.
*
* @since 7.4.0
*/
authTime: number;
/**
* The ID token expiration time in milliseconds since the epoch.
*
* @since 7.4.0
*/
expirationTime: number;
/**
* The ID token issuance time in milliseconds since the epoch.
*
* @since 7.4.0
*/
issuedAtTime: number;
/**
* The sign-in provider through which the ID token was obtained.
*
* @since 7.4.0
*/
signInProvider: string | null;
/**
* The type of second factor associated with this session, provided the user was multi-factor
* authenticated (eg. phone, etc).
*
* @since 7.4.0
*/
signInSecondFactor: string | null;
/**
* The entire payload claims of the ID token including the standard reserved claims as well as
* the custom claims.
*
* @since 7.4.0
*/
claims: Record<string, unknown>;
}

이 페이지는 플러그인의 src/definitions.ts업스트림에서 pubic API이 변경될 때 다시 싱크를 실행하세요.

Capacitor를 사용 중이라면 Getting Started 인증 및 계정 흐름을 계획하고 연결하려면 @capgo/capacitor-social-login @capgo/capacitor-social-login의 구현 세부 정보를 참조하십시오. @capgo/capacitor-passkey @capgo/capacitor-passkey의 구현 세부 정보를 참조하십시오. @capgo/capacitor-native-biometric @capgo/capacitor-native-biometric의 구현 세부 정보를 참조하십시오. 두 단계 인증 두 단계 인증의 구현 세부 정보를 참조하십시오. SSO (기업) SSO (기업)의 구현 세부 정보를 참조하십시오.