How can I reset my ngrok token?

How can I reset my ngrok token?

rgarcia1129
Shopify Partner
1 0 0

Hi all, Im trying to run the example token gating app. I signed up ngrok but accidentally put in the wrong email address. When running the app it keeps failing on the ngrok tunnel step because my email hasnt been verified. I already created an ngrok account with my correct email but the application keeps trying to use the previous ngrok key. 

 

I've already tried running npm dev --reset and even deleted and recloned the example app. It still doesnt give me an option to set a new ngrok key, just tries using the old one. Where does the ngrok get stored and whats the best way to reset that? Thanks for your help! 

Reply 1 (1)

PageFly-Oliver
Shopify Partner
878 190 186

Hi @Rgarcia1129

 

To reset the ngrok configuration in the example token gating app, you can follow these steps:

  1. Go to the root directory of the token gating app in your terminal or command prompt.

  2. Look for a file named .env or .env.local in the root directory. This file contains environment variables used by the app.

  3. Open the .env or .env.local file using a text editor.

  4. Search for the ngrok-related environment variables, such as NGROK_AUTH_TOKEN or NGROK_AUTH, and remove or comment out those lines.

  5. Save the changes to the file.

  6. Run npm run dev command in your terminal or command prompt to start the app again.

By removing or commenting out the ngrok-related environment variables in the .env or .env.local file, the app will no longer use the previous ngrok key. Instead, it will prompt you to set up a new ngrok key or use the default ngrok configuration.

If you can't find the .env or .env.local file in the root directory, make sure to check if it's located in a subdirectory or if it has a different name.

If you continue to face issues, it's recommended to consult the documentation or reach out to the support channels of the example token gating app for further assistance.



 

Hope my solution works perfectly for you.

Cheers!

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.