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

How to find STATE value for OAuth 2.0

I'm trying to connect to JIRA from my app with OAuth2, following this official guide:

https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps

But, I can't figure out where to find the STATE value for the first step of getting an authorization code.

The documentation says : state=YOUR_USER_BOUND_VALUE - Set this to a value that is associated with the user you are directing to the authorization URL, e.g., a hash of the user’s session ID.

Where can I find this value?

2 answers

  • state: (required for security) Set this to a value that is associated with the user you are directing to the authorization URL, e.g., a hash of the user’s session ID. Make sure that this is a value that cannot be guessed. You may be able to generate and validate this value automatically, if you are using an OAuth 2.0 client library or an authentication library with OAuth 2.0 support. For more information, including why this parameter is required for security, see What is the state parameter used for? below.

Wow I can't see how it's useful to copy the documentation he already mentioned in the question... There is no explanation in this doc.

Like # people like this

Is there another possible values for the state ?You are mentioning a hash of the user's session ID, where can I get those considering that the user is not yet authorized ?

It's supposed to be an arbitrary value. The problem was in something else.

what was the problem ?

Suggest an answer

Log in or Sign up to answer
TAGS

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