function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jared GholstonJared Gholston 

OAuth Callback URL local host port ignored

I have a connected app on Salesforce.  The OAuth flow has been working fine for over a year.  Now I want to add a new white listed url for local testing.  Our existing callback url for dev testing has always been http://localhost:3000/#/signup  now we want to add http://localhost:8080/#/signup as we are hosting the front end from tomcat in some cases. 

When we pass the updated callback url to the salesforce login page like so:
https://login.salesforce.com/services/oauth2/authorize?redirect_uri=http://localhost:8080/#/signup

After successful authorization it redirects to:
http://localhost:3000/#/signup

Are we limited to only 1 callback url entry for localhost?

 

Nate Lee 10Nate Lee 10
Hi Jared,
Just curious, did you happen to try listing the 8080 port URL first? I'm implementing something similar with a 3rd party for testing purposes.
Were you able to get this resolved?
Thanks,
Nate
Jared GholstonJared Gholston
We rarely test with the 8080 port any more so it hasn't come up, but I'm pretty sure it has not been resolved. Instead we've been using ngrok to get around issues like this. It's a great tool and the paid version allows you to keep a custom subdomain. Ngrok is perfect for local native app testing and integrating with third party stuff. https://ngrok.com/