Having issues working with Google Oauth in MeteorJS web appMeteor OAuth Exception while invoking method 'login'Google OAuth token exchange returns invalid_codeinvalid_grant Google OAuthMeteor ReferenceError: _ is not definedMeteor Server unable to locate `findUserByEmail`Meteor error on updateCannot read property 'ServiceConfiguration' of undefined meteor productionMeteor Application hosted in Azure using Accounts package causes mongodb connection errorMeteor autoupdate_clientVersion dependency.Meteor package accounts-facebook doesn't work anymore

Why do dragons like shiny stuff?

Write The Shortest Program To Check If A Binary Tree Is Balanced

What are the function of EM and EN spaces?

Purchased new computer from DELL with pre-installed Ubuntu. Won't boot. Should assume its an error from DELL?

Can a Hogwarts student refuse the Sorting Hat's decision?

How easy is it to get a gun illegally in the United States?

Non-small objects in categories

How to approach protecting my code as a research assistant? Should I be worried in the first place?

Can the Kraus decomposition always be chosen to be a statistical mixture of unitary evolutions?

If the interviewer says "We have other interviews to conduct and then back to you in few days", is it a bad sign to not get the job?

Ubuntu show wrong disk sizes, how to solve it?

Can attackers change the public key of certificate during the SSL handshake

What is an air conditioner compressor hard start kit and how does it work?

Could an areostationary satellite help locate asteroids?

Is space radiation a risk for space film photography, and how is this prevented?

Find a text string in a file and output only the rest of the text that follows it?

Make a living as a math programming freelancer?

Do you like Music? This word is Historic

Vibration on the guitar when playing two strings

Whats the difference between <processors> and <pipelines> in Sitecore configuration?

Is a switch from R to Python worth it?

Our group keeps dying during the Lost Mine of Phandelver campaign. What are we doing wrong?

How to check a file was encrypted (really & correctly)

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?



Having issues working with Google Oauth in MeteorJS web app


Meteor OAuth Exception while invoking method 'login'Google OAuth token exchange returns invalid_codeinvalid_grant Google OAuthMeteor ReferenceError: _ is not definedMeteor Server unable to locate `findUserByEmail`Meteor error on updateCannot read property 'ServiceConfiguration' of undefined meteor productionMeteor Application hosted in Azure using Accounts package causes mongodb connection errorMeteor autoupdate_clientVersion dependency.Meteor package accounts-facebook doesn't work anymore






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have taken over a previously developed project that was created with MeteorJS. Since the last developer left. The Google OAuth login to the web app no longer allows new users to create an account with their '@company.com' domain. Old users seem to be able to log in fine. As they must already be in the database.



The previous developer used a function to only allows users with the company domain.



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


When this function is removed, the google account is added to the database. However when it is in place, new users with a respective '@company.com' account are not given access and cannot login.



The output from the server is as follows



“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”


The packages installed for meteor



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









share|improve this question
































    0















    I have taken over a previously developed project that was created with MeteorJS. Since the last developer left. The Google OAuth login to the web app no longer allows new users to create an account with their '@company.com' domain. Old users seem to be able to log in fine. As they must already be in the database.



    The previous developer used a function to only allows users with the company domain.



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


    When this function is removed, the google account is added to the database. However when it is in place, new users with a respective '@company.com' account are not given access and cannot login.



    The output from the server is as follows



    “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”


    The packages installed for meteor



    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









    share|improve this question




























      0












      0








      0








      I have taken over a previously developed project that was created with MeteorJS. Since the last developer left. The Google OAuth login to the web app no longer allows new users to create an account with their '@company.com' domain. Old users seem to be able to log in fine. As they must already be in the database.



      The previous developer used a function to only allows users with the company domain.



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


      When this function is removed, the google account is added to the database. However when it is in place, new users with a respective '@company.com' account are not given access and cannot login.



      The output from the server is as follows



      “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”


      The packages installed for meteor



      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









      share|improve this question
















      I have taken over a previously developed project that was created with MeteorJS. Since the last developer left. The Google OAuth login to the web app no longer allows new users to create an account with their '@company.com' domain. Old users seem to be able to log in fine. As they must already be in the database.



      The previous developer used a function to only allows users with the company domain.



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


      When this function is removed, the google account is added to the database. However when it is in place, new users with a respective '@company.com' account are not given access and cannot login.



      The output from the server is as follows



      “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”


      The packages installed for meteor



      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






      javascript meteor google-oauth meteor-blaze meteor-accounts






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 4:01







      Joshua Pujol

















      asked Mar 27 at 3:41









      Joshua PujolJoshua Pujol

      63 bronze badges




      63 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369447%2fhaving-issues-working-with-google-oauth-in-meteorjs-web-app%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369447%2fhaving-issues-working-with-google-oauth-in-meteorjs-web-app%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript