메뉴로 바로가기

__CAPGO_KEEP_1__

터미널 창
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);

사용자 삭제

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

사용자 삭제

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

__CAPGO_KEEP_2__ 이메일 주소에 대한 로그인 방법을 가져옵니다.

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

__CAPGO_KEEP_2__ 현재 로그인한 사용자를 가져옵니다.

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

__CAPGO_KEEP_2__ 앱이 웹 로그인 흐름을 시작하고 OS가 앱을 백그라운드에서 삭제하는 경우. SignInResult __CAPGO_KEEP_2__ Android에서만 사용 가능합니다.

__CAPGO_KEEP_0__

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

Firebase 서비스에 사용자를 식별하기 위해 사용되는 JSON Web 토큰을 반환합니다.

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

getRedirectResult

getRedirectResult

redirect-based sign-in 흐름에서 반환되는 SignInResult redirect 연산이 호출되지 않은 경우 null 사용자를 포함한

redirect 연산이 호출되지 않은 경우 null 사용자를 포함한 SignInResult 웹에서만 사용 가능

에러로 실패합니다.

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

getTenantId

getTenantId

테넌트 ID를 가져옵니다.

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 복사

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

linkWithEmailAndPassword

linkWithEmailAndPassword

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

네이티브层에서 로그인되어 있어야 합니다. skipNativeAuth 이 설정 옵션은 여기에 영향을 미치지 않습니다.

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

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

네이티브层에서 로그인되어 있어야 합니다. skipNativeAuth 이 설정 옵션은 여기에 영향을 미치지 않습니다.

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

linkWithFacebook

linkWithFacebook

페이스북 인증 제공자와 사용자 계정을 연결합니다.

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

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

linkWithGameCenter

Game Center 연결

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

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

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

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

linkWithGithub

GitHub 연결

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

로그인된 사용자가 필요합니다. skipNativeAuth 설정 옵션은 이곳에서 효과가 없습니다.

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

linkWithGoogle

링크WithGoogle

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

네이티브层에서 로그인해야 합니다. 설정 옵션은 이곳에서 효과가 없습니다. skipNativeAuth 클립보드에 복사

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

네이티브层에서 로그인해야 합니다. 설정 옵션은 이곳에서 효과가 없습니다.

클립보드에 복사 skipNativeAuth 설정 옵션은 이곳에서 효과가 없습니다.

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

linkWithOpenIdConnect

OpenID Connect 연결

OpenID Connect 제공자와 사용자 계정을 연결합니다.

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

사용자가 네이티브层에서 로그인되어야 합니다. 이 설정 옵션은 여기서 효과가 없습니다.

인증이 완료되면 알림을 받으려면 skipNativeAuth 인증이 실패하면 알림을 받으려면

인증 ID를 얻으려면 phoneVerificationCompleted 클립보드에 복사 phoneVerificationFailed Section titled “linkWithApple” phoneCodeSent Links the user account with an Apple authentication provider.

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

linkWithPlayGames

Play Games 인증 연결

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

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

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

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

linkWithTwitter

Twitter 인증 연결

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

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

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

linkWithYahoo

Yahoo 인증 연결

__CAPGO_KEEP_0__ 계정에 Yahoo 인증 제공자를 연결합니다.

__CAPGO_KEEP_0__ 계정에 로그인되어야 합니다. __CAPGO_KEEP_0__ 구성 옵션은 이곳에 영향을 미치지 않습니다. skipNativeAuth __CAPGO_KEEP_0__ 복사

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

__CAPGO_KEEP_0__ 계정 데이터를 다시 로드합니다. (로그인 시에만).

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

revokeAccessToken

__CAPGO_KEEP_3__

__CAPGO_KEEP_0__에 제공된 액세스 토큰을 취소합니다. 현재는 Apple OAuth 액세스 토큰만 지원합니다.

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

sendEmailVerification

__CAPGO_KEEP_4__

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

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

비밀번호 재설정 이메일을 보냅니다.

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_0__

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

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

setTenantId

__CAPGO_KEEP_4__

__CAPGO_KEEP_5__

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

signInAnonymously

__CAPGO_KEEP_7__

__CAPGO_KEEP_8__

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

signInWithApple

__CAPGO_KEEP_10__

__CAPGO_KEEP_11__

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

사용자 지정 토큰으로 로그인하는 흐름을 시작합니다.

이 메서드는 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);
클립보드 복사

“signInWithCustomToken” 섹션

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

signInWithFacebook

Facebook 로그인 시작

Facebook 로그인을 시작합니다.

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

signInWithGameCenter

Game Center 로그인 시작

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

Google 로그인 시작

Google 인증 흐름을 시작합니다.

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

Microsoft 인증 흐름을 시작합니다.

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

OpenID Connect 인증 흐름을 시작합니다.

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

전화번호를 사용한 인증 흐름을 시작합니다.

Use the phoneVerificationCompleted 인증을 완료할 때 알림을 받기 위해 사용하세요. 인증을 완료할 때 알림을 받기 위해 사용하세요. phoneVerificationFailed __CAPGO_KEEP_0__를 위한 알림을 받을 수 있는 리스너입니다. __CAPGO_KEEP_1__를 사용하여 phoneCodeSent __CAPGO_KEEP_0__ ID를 얻기 위한 리스너입니다.

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

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

signInWithPlayGames

signInWithPlayGames

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

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

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

signInWithTwitter

signInWithTwitter

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

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

signInWithYahoo

signInWithYahoo

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

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

로그아웃 흐름을 시작합니다.

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

연결 해제

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

이메일 주소 업데이트

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

useAppLanguage

useAppLanguage 섹션

code으로 설정된 사용자 화면 언어를 기본 앱 언어로 설정합니다.

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

앱 추적성 투명성 확인 섹션

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

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

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

requestAppTrackingTransparencyPermission

앱 추적성 투명성 요청 섹션

앱 추적성 투명성을 허가하는 시스템 대화창을 열어줍니다.

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

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

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

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

ApplyActionCodeOptions

__CAPGO_KEEP_3__
export interface ApplyActionCodeOptions {
/**
* A verification code sent to the user.
*
* @since 0.2.2
*/
oobCode: string;
}

ConfirmPasswordResetOptions

__CAPGO_KEEP_4__
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

__CAPGO_KEEP_5__
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;
}

SignInResult

__CAPGO_KEEP_6__
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

__CAPGO_KEEP_7__
export interface CreateUserWithEmailAndPasswordOptions {
/**
* @since 0.2.2
*/
email: string;
/**
* @since 0.2.2
*/
password: string;
}

FetchSignInMethodsForEmailOptions

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

FetchSignInMethodsForEmailResult

__CAPGO_KEEP_2__
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[];
}

GetCurrentUserResult

__CAPGO_KEEP_3__
export interface GetCurrentUserResult {
/**
* The currently signed-in user, or null if there isn't any.
*
* @since 0.1.0
*/
user: User | null;
}

GetIdTokenOptions

__CAPGO_KEEP_4__
export interface GetIdTokenOptions {
/**
* Force refresh regardless of token expiration.
*
* @since 0.1.0
*/
forceRefresh: boolean;
}

GetIdTokenResult

__CAPGO_KEEP_5__
export interface GetIdTokenResult {
/**
* The Firebase Auth ID token JWT string.
*
* @since 0.1.0
*/
token: string;
}

GetIdTokenResultOptions

__CAPGO_KEEP_6__
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 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.

이미 사용 중인 경우 Getting Started 인증 및 계정 흐름을 계획하고 연결하려면 @capgo/capacitor-social-login capgo/capacitor-social-login 구현 세부 사항을 참조하십시오. @capgo/capacitor-passkey capgo/capacitor-passkey 구현 세부 사항을 참조하십시오. @capgo/capacitor-native-biometric capgo/capacitor-native-biometric 구현 세부 사항을 참조하십시오. Two-factor authentication 두 단계 인증 구현 세부 사항을 참조하십시오. SSO (Enterprise) SSO (기업) 구현 세부 사항을 참조하십시오.