I recently installed and configured Ngrok in order to test my localhost meteor App on my mobile.
I successfully manage to access the meteor app om my mobile phone via a tunnel by ngrok.
However when it comes to the google Oauth, I get this error message in the terminal:
I20161011-01:04:57.966(3)? at Object.ServiceConfiguration.configurations.findOne.service [as handleOauthRequest] (packages/google/google_server.js:10:1)
I20161011-01:04:57.967(3)? at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:8:1)
I20161011-01:04:57.969(3)? at middleware (packages/oauth/oauth_server.js:173:1)
I20161011-01:04:57.969(3)? at packages/oauth/oauth_server.js:146:1
W20161011-01:05:56.313(3) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] { "error" : "redirect_uri_mismatch" }
I20161011-01:05:57.294(3)? Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Google. failed [400] { "error" : "redirect_uri_mismatch" }
I20161011-01:05:57.294(3)? at getTokens (packages/google/google_server.js:59:1)
I20161011-01:05:57.294(3)? at Object.ServiceConfiguration.configurations.findOne.service [as handleOauthRequest] (packages/google/google_server.js:10:1)
I20161011-01:05:57.294(3)? at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:8:1)
I20161011-01:05:57.294(3)? at middleware (packages/oauth/oauth_server.js:173:1)
I20161011-01:05:57.294(3)? at packages/oauth/oauth_server.js:146:1
Can anyone make sense of this?
Find below my app configurations:
In Client
Meteor.startup(function () {
// Client startup method.
Meteor.absoluteUrl.defaultOptions.rootUrl = ‘http://xxxxxxxx.ngrok.io’;
});
Subsequently when I then “Configure Google”, I am prompted to Set Authorized Javascript Origins to: http://xxxxxxxx.ngrok.io and Set Authorized Redirect URI to: http://xxxxxxxx.ngrok.io/_oauth/google.
Any help is greatly appreciated