It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why am I getting a different STATE param on return from my OAuth auth request? Edited

My JS app calls for an OAuth 2 auth request our the docs  - something like: 

request

.get( 'https://auth.atlassian.com/authorize' )

.query('audience=api.atlassian.com')

.query('client_id=MY CLIENT ID')

.query('scope=read%3Ajira-user%20read%3Ajira-work%20write%3Ajira-work')

.query('redirect_uri=MY REDIRECT URI')

.query('state=MYCUSTOMSTATE') 

.query('response_type=code')

.query('prompt=consent'

 

The request returns a page containing JS code based on the Auth0 libraries.  When the browser finishes processing the page, it produces a response that contains this URL for the redirect to my redirect URI:

https://auth.atlassian.com/login?state=g6Fo2SAySldGUkZucnhFdk5WUThFVG1WLXhtUGt5X3RBRmJVRaN0aWTZIElqZ1lOdEtjUkkwb1M2bVZnNlFCLUU5UEFOM0FLUjhLo2NpZNkga1I2Q1Z3NzRGeGJIUDVqVG1Ka2xIeFljT2txWTZqQUM&client=MY CLIENT ID&protocol=oauth2&prompt=consent&audience=api.atlassian.com&scope=read%3Ajira-user%20read%3Ajira-work%20write%3Ajira-work&redirect_uri=MY REDIRECT URI&response_type=code

As you can see, this is a different STATE parameter, when the docs indicate it should be the same as the STATE I sent in the auth request.  What's going on here?  

 

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

933 views 8 25
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you