Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I update the callback URL?

kamruzzamantitu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 27, 2021

I have created am OAuth 2.0 (3LO) integration project in the developer console to consume Jira Cloud APIs. Initially I was able to set the callback URL and build my client project based on that, and it's working great. Now I need to deploy my client project for which I need to update the callback URL but it's not working for some reason. See the following screenshot.

callbackurl.png

The 'Save changes' button is disabled even though I have made changes and that's why Discard changes button appeared.

Any idea how to fix this?

2 answers

0 votes
Bethany Maloney
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2021

You can't use https and localhost. If you want to use localhost it must be http 🤷

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2021

Hello @kamruzzamantitu ,

I believe you cannot set localhost as the callback url.

That's because localhost is always resolved as 127.0.0.1 (the local computer) and therefore, in your case, it is like you are setting the callback url as: https://developer.atlassian.com:44318/signin-jira

 

For more details please see: https://en.wikipedia.org/wiki/Localhost

 

Cheers,
Dario

kamruzzamantitu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2021

Hi @Dario B,
Thanks for your reply. But I'm not sure why you think callback urls cannot be set to localhost. It actually works. I have done integration to Google, Okta and even on Atlassian OAuth, and it works fine. I think most of the developers use localhost (with or without port) as the callback url during development at his/her local machine.


Anyway I think I didn't describe the actual issue properly and the word "localhost" misguided my question. Currently I'm developing an application which uses Atlassian Oauth 2.0 (3LO) and I was using the callback url "https://localhost:44318/signin-jira". It was working perfectly. But for some reason I wanted to change the callback URL to "https://localhost:44318/signin-atlassian" and the system was not allowing that. I think the logic that enables/disables the save changes button has a bug.

Cheers,
Kamruzzaman

Like Bethany Maloney likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2021

Hello @kamruzzamantitu ,

 

Thanks for your reply. But I'm not sure why you think callback urls cannot be set to localhost.

I have just tried it and I can confirm that if you set whatever hostname as the callback url then everything works fine, while the save button is greyed out if you try to use localhost.

Please see below screenshots:

No-localhost-works.jpg    Localhost-DONT-WORK.jpg

Now, I actually believe this is expected and they actually fixed the erratic behavior that allowed people to set localhost as the callback url. In order to be able to save, you need to enter a valid URL reachable from the Internet.

However, since this is actually not the best place to get support on development related question and I might as well not be the best person to answer your question, I strongly advise to refer to the resources listed in https://developer.atlassian.com/resources instead:

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events