Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do use ngrok in conjunction with Google Oauth?

I recently installed Ngrok in order to test my localhost meteor App on my phone. I am successful in accessing the meteor app via a tunnel by ngrok. However when I try to login using I get this error message:

The login process shows the following error message:

400. That’s an error.

Error: redirect_uri_mismatch

Application: AppName

You can email the developer of this application at: [email protected]

The redirect URI in the request, http://localhost:7123/_oauth/google, 
does not match the ones authorized for the OAuth client.

Updating the Authorized JavaScript origins & redirect URIs to the Ngrok forwarding addresses, doesn't have an effect.

How do I correctly use ngrok in conjuction with Google Oauth?

Any help would be greatly appreciated

like image 495
SirBT Avatar asked Oct 04 '16 19:10

SirBT


People also ask

How do I add authentication to Ngrok?

Install your authtoken​ The ngrok agent connects to the ngrok cloud and authenticates using the authtoken that is created when you sign up for ngrok. You can find the authtoken in the ngrok Dashboard. This command will create a configuration file at the default location for your system.

Does Ngrok require port forwarding?

Your localhost development server is mapped to an ngrok.io sub-domain, which a remote user can then access. There's no need to expose ports, set up forwarding, or make other network changes. The ngrok client software is available for Windows, macOS, and Linux.


1 Answers

Use ngrok and change the Root URL to the one supplied by ngrok.

ROOT_URL=http:XXXXXXXX.ngrok.io meteor to start meteor.

like image 177
Ankit Avatar answered Nov 03 '22 04:11

Ankit