質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

Q&A

1回答

1117閲覧

Fluttterでappleのサインインができない

Ezochi

総合スコア2

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

0グッド

0クリップ

投稿2021/09/10 06:50

puvのsign_in_with_appleを使って、appleのログイン機能の実装を行なっているのですが、パスワードの入力画面でローディングが周り続けて先に進みません。
xcodeでのcapabilityの設定や、apple developer programでのidentifyの設定も一応、完了しています。

イメージ説明

dart

1String generateNonce([int length = 32]) { 2 final charset = 3 '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._'; 4 final random = Random.secure(); 5 return List.generate(length, (_) => charset[random.nextInt(charset.length)]) 6 .join(); 7 } 8 9 /// Returns the sha256 hash of [input] in hex notation. 10 String sha256ofString(String input) { 11 final bytes = utf8.encode(input); 12 final digest = sha256.convert(bytes); 13 return digest.toString(); 14 } 15 16 Future<UserCredential> signWithApple() async { 17 final rawnonce = generateNonce(); 18 final nonce = sha256ofString(rawnonce); 19 20 final appleCredential = await SignInWithApple.getAppleIDCredential( 21 scopes: [ 22 AppleIDAuthorizationScopes.email, 23 AppleIDAuthorizationScopes.fullName, 24 ], 25 nonce: nonce, 26 ); 27 28 final oauthCredential = OAuthProvider("apple.con").credential( 29 idToken: appleCredential.identityToken, 30 rawNonce: rawnonce, 31 ); 32 33 return await FirebaseAuth.instance.signInWithCredential(oauthCredential); 34 } 35参考にした記事など 36https://pub.dev/packages/sign_in_with_apple/install 37https://firebase.flutter.dev/docs/auth/social/#apple 38https://firebase.google.com/docs/auth/ios/apple#configure-sign-in-with-apple 39 40デバッグ内容と自身の考察puvのsign_in_with_appleを使って、appleのログイン機能の実装を行なっているのですが、パスワードの入力画面でローディングが周り続けて先に進みません。 41xcodeでのcapabilityの設定や、apple developer programでのidentifyの設定も一応、完了しています。 42Dvw198aHnDSME6A1631149922_1631150031 43 44String generateNonce([int length = 32]) { 45 final charset = 46 '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._'; 47 final random = Random.secure(); 48 return List.generate(length, (_) => charset[random.nextInt(charset.length)]) 49 .join(); 50 } 51 52 /// Returns the sha256 hash of [input] in hex notation. 53 String sha256ofString(String input) { 54 final bytes = utf8.encode(input); 55 final digest = sha256.convert(bytes); 56 return digest.toString(); 57 } 58 59 Future<UserCredential> signWithApple() async { 60 final rawnonce = generateNonce(); 61 final nonce = sha256ofString(rawnonce); 62 63 try { 64 final appleCredential = await SignInWithApple.getAppleIDCredential( 65 scopes: [ 66 AppleIDAuthorizationScopes.email, 67 AppleIDAuthorizationScopes.fullName, 68 ], 69 nonce: nonce, 70 ); 71 72 final oauthCredential = OAuthProvider("apple.con").credential( 73 idToken: appleCredential.identityToken, 74 rawNonce: rawnonce, 75 ); 76 77 return await FirebaseAuth.instance.signInWithCredential(oauthCredential); 78 } catch (e) { 79 print(e); 80 } 81 }

参考にした記事など
https://pub.dev/packages/sign_in_with_apple/install
https://firebase.flutter.dev/docs/auth/social/#apple
https://firebase.google.com/docs/auth/ios/apple#configure-sign-in-with-apple

デバッグ内容と自身の考察

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

OAuthProvider("apple.con")

"apple.com" ではなく "apple.con" になっています。

投稿2022/07/13 15:44

i88seven

総合スコア6

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問