# Variable Length Authorization Code and Access Token Max Size

**URL:** <https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [October 21, 2021, 5:36pm UTC](https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810 "2021-10-21T17:36:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blairt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/blairt/32/12857_2.png) [@blairt](https://community.auth0.com/u/blairt)\
**Post date:** [October 21, 2021, 5:36pm UTC](https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810/1 "2021-10-21T17:36:25Z")

</div>

Hello, I think its great that Auth0 is supporting RFC 6749 specifications. I have switched off the fixed length size for auth codes and access tokens, but it still would be nice to know the max sizes that could be returned.

In addition to the spec mentioning “The authorization code string size is left undefined by this specification. The client should avoid making assumptions about code value sizes.”, the spec also mentions “The authorization server SHOULD document the size of any value it issues.”

Is there any such documentation?

Thanks.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 21, 2021, 9:41pm UTC](https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810/3 "2021-10-21T21:41:25Z")

</div>

Hi @blairt,

Welcome to the Auth0 Community!

Thanks for reaching out on this. As far as I know, we don’t have docs on token and auth code sizes, but I am investigating and will update here with my findings.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 1, 2021, 8:39pm UTC](https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810/4 "2021-11-01T20:39:00Z")

</div>

Here is the update:

> For a token that is meant to be used with the userinfo endpoint, the customer is safe to assume that the size of the token will not exceed 4096 characters.
> 
> In the general case, the exact content of access tokens cannot be determined beforehand (e.g scopes and claims can vary in number and size depending on circumstances) hence no specific guidance about size is given.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 16, 2021, 8:40pm UTC](https://community.auth0.com/t/variable-length-authorization-code-and-access-token-max-size/71810/5 "2021-11-16T20:40:00Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
