If you already have a webserver running on localhost, and haven’t set it up to handle the OAuth process, then yeah it likely wont work as you’re doing other stuff on that port, so use a different one, for example http://localhost:3000 and try again.
You should get redirected back to that URL with various querystring parameters in the URL depending on what auth flow you used, eg,
http://localhost:3000?code=394a8bc98028f39660e53025de824134fb46313&scope=viewing_activity_read&state=c3ab8aa609ea11e793ae92361f002671