为我的流星应用程序设置谷歌登录配置后,如何重置谷歌登录配置? [英] How do I reset google login configuration once I have set it for my meteor app?

查看:58
本文介绍了为我的流星应用程序设置谷歌登录配置后,如何重置谷歌登录配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习meteor,并创建了一个新应用并安装了accounts-core、accounts-google 和accounts-ui.这按预期工作并提示我配置谷歌集成.但是,在我配置它之后,我意识到我使用了错误的 url,并在 Google API 中更改了它.如何让这个改动在流星端生效?换句话说,我如何回到流星谷歌配置页面,在那里我输入客户端 ID 和密码?

I am learning meteor and have created a new app and installed accounts-core, accounts-google and accounts-ui. This worked as expected and prompted me to configure the google integration. After I configured it, though, I realized I used an incorrect url and changed it in the Google API. How do I make this change take effect in the meteor side? In other words, how do I get back to the meteor google configuration page where I enter the client id and secret?

推荐答案

首先添加服务配置包:

meteor add service-configuration

然后,在您的应用程序的系统文件夹中(如果没有,则创建它)添加一个名为 service.js 的文件,并在其中添加:

Then, in your app in the system folder (create it if you don't have one) add a file called service.js and in there add:

// 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 - 使用外部服务登录

这篇关于为我的流星应用程序设置谷歌登录配置后,如何重置谷歌登录配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆