14

私は流星を学んでおり、新しいアプリを作成し、accounts-core、accounts-google、accounts-ui をインストールしました。これは期待どおりに機能し、Google 統合を構成するように促されました。しかし、設定した後、間違った URL を使用していたことに気付き、Google API で変更しました。この変更を流星側で有効にするにはどうすればよいですか? つまり、クライアント ID とシークレットを入力する meteor の Google 構成ページに戻るにはどうすればよいでしょうか?

4

5 に答える 5

20

これはsnizeの答えの軽い改訂にすぎませんが、これは私にとってはうまくいきました:

$ meteor mongo
MongoDB shell version: 2.4.3
connecting to: 127.0.0.1:3002/meteor
> db.meteor_accounts_loginServiceConfiguration.remove({"service":"google"})
于 2013-07-26T19:34:00.243 に答える
14

まず、サービス構成パッケージを追加します。

meteor add service-configuration

次に、アプリのシステム フォルダー (ない場合は作成します) に service.js というファイルを追加し、そこに次を追加します。

// first, remove configuration entry in case service is already configured
ServiceConfiguration.configurations.remove({
  service: "google"
});
ServiceConfiguration.configurations.insert({
  service: "google",
  clientId: "123456789",
  loginStyle: "popup",
  secret: "8j4ldfjSECRET-HEREalkjf8slk"
});

参考資料:
Meteor Docs - 外部サービスでログイン

于 2015-01-20T07:36:46.207 に答える
3

これはどう。

アカウント構成のみをクリアしています。プロジェクトで試しました。

流星モンゴ

$ meteor mongo
MongoDB shell version: 2.4.3
connecting to: 127.0.0.1:3002/meteor
> show collections
meteor_accounts_loginServiceConfiguration
posts
system.indexes
users
> db.meteor_accounts_loginServiceConfiguration
meteor.meteor_accounts_loginServiceConfiguration
> db.meteor_accounts_loginServiceConfiguration.find()
{ "service" : "twitter", "consumerKey" : "MYconsumerKey", "secret" : "MYsecret", "_id" : "MYid" }
>
> db.meteor_accounts_loginServiceConfiguration.remove()

プロジェクト内のすべてのデータを消去しています。

$ meteor reset -h
Usage: meteor reset

Reset the current project to a fresh state. Removes all local
data and kills any running meteor development servers.
于 2013-06-14T02:15:26.587 に答える
1

Ameteor resetはすべてを 0 に戻します。賢明に使用してください。

于 2015-09-07T11:45:40.197 に答える