0Pricing
Firebase Auth & Realtime Database Apps · 강의

Apple 로그인 연동

Firebase 앱에 Apple로 로그인하기를 추가하고, 소셜 로그인에 필요한 Apple의 App Store 요구 사항을 충족하며, 개인정보 보호를 위한 Apple의 이메일 릴레이를 올바르게 처리합니다.

Apple 로그인 연동은(는) CoddyKit의 무료 Firebase Auth & Realtime Database Apps 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Firebase Auth & Realtime Database Apps 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Firebase Auth & Realtime Database Apps 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Apple Sign-In

If your iOS app offers any third-party social login (Google, Facebook, etc.), Apple's App Store guidelines require you to also offer Sign in with Apple. Beyond compliance, it is a fast, privacy-respecting option users trust.

How It Differs

Apple Sign-In has unique traits compared to other providers:

  • Users can hide their real email via a private relay address
  • Name and email are only returned on the first sign-in
  • Requires an Apple Developer account to configure

Enabling the Provider

In the Firebase console open Authentication > Sign-in method and enable Apple. For web you must also supply your Apple Service ID, Team ID, Key ID, and a private key generated in the Apple Developer portal.

Configuring the OAuth Provider

On the web you use Firebase's OAuthProvider with the Apple provider ID and request the scopes you need.

import { OAuthProvider } from 'firebase/auth';

const provider = new OAuthProvider('apple.com');
provider.addScope('email');
provider.addScope('name');

Triggering the Sign-In

Use signInWithPopup (or redirect on mobile web) to launch the Apple flow and receive a Firebase user.

import { getAuth, signInWithPopup } from 'firebase/auth';

const result = await signInWithPopup(getAuth(), provider);
const user = result.user;
console.log('Signed in as', user.uid);

Capturing Name on First Sign-In

Apple sends the user's full name only once, on the very first authorization. Persist it immediately, because subsequent sign-ins will not include it.

const credential = OAuthProvider.credentialFromResult(result);
const fullName = result._tokenResponse?.displayName;
if (fullName) saveProfileName(user.uid, fullName);

The Private Email Relay

If a user chooses to hide their email, Apple returns a relay address like abc123@privaterelay.appleid.com. Email sent to it is forwarded to the user.

  • Treat it as a valid, stable email
  • Do not require the 'real' address

Account Linking

A user may sign in with Apple after previously using email/password with the same address. Use Firebase account linking to merge identities into a single account rather than creating duplicates.

import { linkWithCredential } from 'firebase/auth';

const cred = OAuthProvider.credentialFromResult(result);
await linkWithCredential(existingUser, cred);

Native iOS Considerations

In a native iOS app you generate a nonce and pass Apple's identity token plus that nonce to Firebase. The nonce protects against replay attacks and is required by Firebase for native Apple credentials.

Handling Cancellation

Users can dismiss the Apple sheet. This surfaces as an error you should treat as a silent no-op, not a failure to display loudly.

try {
  await signInWithPopup(getAuth(), provider);
} catch (e) {
  if (e.code === 'auth/popup-closed-by-user') return;
  showError('Sign-in failed, please try again.');
}

Testing and Review

Apple reviewers actively check that Sign in with Apple is offered when other social logins exist. Test the full flow, including the hide-email path, before submitting your app for review.

Quick Check

Test your understanding of Apple Sign-In.

Recap

You can now add Apple Sign-In correctly.

  • Required when other social logins are offered on iOS
  • Configure the provider with Service/Team/Key IDs
  • Capture the name on first sign-in only
  • Support the private email relay
  • Use nonces natively and link duplicate accounts

자주 묻는 질문

“Apple 로그인 연동” 강의는 무료인가요?

네 — “Apple 로그인 연동” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Firebase Auth & Realtime Database Apps 강의 전체를 잠금 해제할 수 있습니다. Firebase Auth & Realtime Database Apps 강의에는 총 4개의 강의가 포함되어 있습니다.

“Apple 로그인 연동”에서 뭘 배우나요?

Firebase 앱에 Apple로 로그인하기를 추가하고, 소셜 로그인에 필요한 Apple의 App Store 요구 사항을 충족하며, 개인정보 보호를 위한 Apple의 이메일 릴레이를 올바르게 처리합니다. 브라우저에서 직접 실행하는 실습 코드로 Firebase Auth & Realtime Database Apps을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Firebase Auth & Realtime Database Apps을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Firebase Auth & Realtime Database Apps은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“Apple 로그인 연동” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Firebase Auth & Realtime Database Apps 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Firebase Auth & Realtime Database Apps 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Google 로그인 통합
  2. Facebook 및 GitHub 인증
  3. 익명 인증 및 사용자 지정 인증
  4. Apple 로그인 연동
← Firebase Auth & Realtime Database Apps(으)로 돌아가기