We are implementing OAuth 2.0 Authorization Code flow for authentication with Jira (Jira Service Management / Jira Cloud).
During the flow, our application receives an authorization code after the user grants consent. We would like to understand the validity and behavior of this code in more detail.
Could you please clarify:
How long is the OAuth 2.0 authorization code valid after it is generated?
Is the authorization code single-use only, or can it be reused within its validity window?
Does the code expire immediately after first use or after a fixed time period (for example, a few minutes)?
In case the code is not exchanged for an access token within the validity period, is a new authorization request required from the user?
Hi @AutomationUIUser , one caveat on sourcing first: Atlassian's 3LO docs walk through the authorization code flow but don't publish an exact lifetime or a single-use guarantee for the authorization code itself. The only expiry they document is on the access token, via expires_in. So the code's behaviour follows the OAuth 2.0 standard that Atlassian implements, which answers your four points:
Reference: Implementing the authorization code flow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.