Broken Redirect URL

Hello guys,
I have the problem that my redirect url is broken.

In the developer console under the app → authorization → callback url I enter follwoing url:
http://localhost:4000/#/callback/atlassian

After I grant the access and get redirect the url looks like this:
http://localhost:4000/?code=I-fGkXa0oHvHLj6YDbTZ9ZkNLUwntaMZcEkFJaIhS0zuv&state=%24{YOUR_USER_BOUND_VALUE}#/callback/atlassian

do you have an idea how I can fix the redirect url?

Kind regards

Hi @SergeiL,
Welcome to the Atlassian developer community!

I can confirm that the URL will change in the way you shared when adding a hash (#) to the callback URL.

I don’t think there is an option to fix the redirect URL if your goal is to preserve the hash, but you could consider to replace the callback URL with something different that doesn’t contain the hash like the following:
http://localhost:4000/callback/atlassian

If you are using a framework, you might also need to add another endpoint (e.g. http://localhost:4000/api/v1/redirect-to-page) and there redirect to the URL with the hash and maintaining the code parameter added by the consent screen.

Caterina

1 Like