[Apple 출시 거절] Sign in with Apple
역시 한번에 되지 않을 줄 알았다!
Guidline 4.8 - Design - Sign in with Apple
애플 출시를 위해서는 무조건 애플 아이디가 필요하다!
애플 아이디 구현 전 사전 단계
https://velog.io/@sumong/Flutter%EC%97%90%EC%84%9C-Apple-Login-%EA%B5%AC%ED%98%84%ED%95%98%EA%B8%B0
다음 블로그를 참고하였다!
코드 구현
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
Future signInWithApple() async {
try {
// 1. Get Apple Sign-In credentials
final AuthorizationCredentialAppleID appleCredential =
await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
// 2. Get the Firebase credential
final OAuthProvider oAuthProvider = OAuthProvider("apple.com");
final AuthCredential credential = oAuthProvider.credential(
idToken: appleCredential.identityToken,
accessToken: appleCredential.authorizationCode,
);
// 3. Sign in or link with Firebase
UserCredential firebaseUserCredential =
await FirebaseAuth.instance.signInWithCredential(credential);
}
sign_in_with_apple api를 사용 https://pub.dev/packages/sign_in_with_apple/example
appleCredential.identityToken 번들 ID 일치 확인!!!
12.22 iOS 반디 출시!!
https://apps.apple.com/kr/app/%EB%B0%98%EB%94%94/id6474688663