It looks like you have hard-coded the redirectUri in your code to https://localhost-3000/oauth/callback. This means that after the user logs in to Square, they will be redirected to that URL. However, if your app is not set up to handle the OAuth response at that URL, the user will not be redirected back to your app.
To fix this issue, you need to make sure that the redirectUri in your code matches the redirect URI that you have set up in your Square Developer Dashboard. Additionally, you should ensure that your app is set up to handle the OAuth response at that redirect URI.
Once you have the correct redirectUri set up in your code and your app is set up to handle the OAuth response, the authorization flow should work as expected and the user should be redirected back to your app after logging in to Square.
