在MeteorJS网络应用程序中使用Google Oauth时遇到问题

时间:2019-03-27 03:41:52

标签: javascript meteor google-oauth meteor-blaze meteor-accounts

我已经接管了以前使用MeteorJS创建的项目。自从最后一位开发人员离开。通过Google OAuth登录网络应用程序,不再允许新用户使用其'@ company.com'域创建帐户。老用户似乎可以正常登录。因为它们必须已经在数据库中。

以前的开发人员使用的功能仅允许拥有公司域的用户使用。

Accounts.config({restrictCreationByEmailDomain:'company.com'});

删除此功能后,Google帐户将添加到数据库中。但是,安装到位后,具有相应'@ company.com'帐户的新用户将无法获得访问权限,也无法登录。

服务器的输出如下

{“line”:“392",“file”:“oauth_server.js”,“message”:“Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] {   \“error\“: \“invalid_grant\“,   \“error_description\“: \“Bad Request\” }“,”time”:{“$date”:1552410081069},“level”:“warn”}
{“line”:“392”,“file”:“oauth_server.js”,“message”:“Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] {   \“error\“: \“invalid_grant\“,   \“error_description\“: \“Bad Request\” }“,”time”:{“$date”:1552410206751},“level”:“warn”}
{“line”:“392”,“file”:“oauth_server.js”,“message”:“Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] {   \“error\“: \“invalid_grant\“,   \“error_description\“: \“Bad Request\” }“,”time”:{“$date”:1552410212693},“level”:“warn”}

为流星安装的软件包

meteor-base@1.4.0                   # Packages every Meteor app needs to have
mobile-experience@1.0.5             # Packages for a great mobile UX
mongo@1.6.0                         # The database Meteor supports right now
blaze-html-templates                # Compile .html files into Meteor Blaze views
reactive-var@1.0.11                 # Reactive variable for tracker
tracker@1.2.0                       # Meteor's client-side reactive programming library

standard-minifier-css@1.5.2         # CSS minifier run for production mode
standard-minifier-js@2.4.0          # JS minifier run for production mode
es5-shim@4.8.0                      # ECMAScript 5 compatibility for older browsers
ecmascript@0.12.4                   # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0                  # Server-side component of the `meteor shell` command

kadira:flow-router                  # FlowRouter is a very simple router for Meteor
kadira:blaze-layout                 # Layout manager for blaze (works well with FlowRouter)
less@2.8.0                         # Leaner CSS language

meteortesting:mocha                 # A package for writing and running your meteor app and package tests with mocha
johanbrook:publication-collector    # Test a Meteor publication by collecting its output

fourseven:scss
accounts-ui-unstyled@1.4.1

google-config-ui@1.0.1
jquery
zimme:active-route
service-configuration@1.0.11
#mixmax:smart-disconnect             # Disconnects client to save resources

okgrow:analytics
browser-policy-framing@1.1.0
#astronomerio:core
accounts-google

0 个答案:

没有答案