Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Does refreshing a token causes the old token to be revoked

I was wondering, when I refresh a token, does it causes the old token to be revoked even if it was not yet expired?

1 answer

1 accepted

1 vote
Answer accepted

Hello @Roi Kramer,

I assume you're asking about validity of access tokens (you use refresh token to get an access token). The answer is no: the access token that hasn't expired yet will not be revoked if you request a new access token.

Simply speaking, expiry time and other parameters are encoded in the access token itself and entire token is encrypted with refresh token. When you use your access token to authenticate a request, Bitbucket decrypts the token using refresh token and reads its metadata. So any access token which Bitbucket still has matching refresh token for will work.

If you revoke the refresh token though (remove OAuth consumer or revoke your consent in your account settings), all access tokens will stop working, even those that haven't expired yet.

Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,886 views 0 7
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