3

そこで、Apple から提供された例 (CloudKit カタログ) を読んだところ、書き込みまたは読み取りを行うたびに、API トークンをスクリプトに入れる必要があることに気付きました。

現在、Javascript はクライアントベースです。つまり、すべてのユーザーが API トークンを読み取って、コンテナーに読み書きできるということですか?!

このコードは、Javascript ファイルの 1 つにあります。

CloudKit.configure({
locale: 'en-us',

containers: [{

// Change this to a container identifier you own.
containerIdentifier: 'com.example.apple-samplecode.cloudkit-catalog',

apiTokenAuth: {
  // And generate a web token through CloudKit Dashboard.
  apiToken: '<insert your token here>',

  persist: true, // Sets a cookie.

  signInButton: {
    id: 'apple-sign-in-button',
    theme: 'black' // Other options: 'white', 'white-with-outline'.
  },

  signOutButton: {
    id: 'apple-sign-out-button',
    theme: 'black'
  }
},

environment: 'development'
}]
});

ここでの質問は次のとおりです。何かが足りないのでしょうか、それともノードを介したサーバー間通信を使用するための解決策ですか?

4

2 に答える 2