Auth0 Home Blog Docs

Getting "The generated token is too large" error



I’m getting this issue while try to login via Auth0.s in Angular app with version 8.8.0.

{error: “invalid_request”, errorDescription: “The generated token is too large. Try with more specific scopes.”}

I have following scope: 'openid profile'

The same scope being used between multiple apps, some of them are on Asp.Net, but for only Angular app we are getting this issue.


Although technically there is no maximum size for a JWT (the token format used by an ID token) when an ID token is requested through the implicit grant (used for SPA’s) there is a limit imposed because in most situations that token will likely be included as part of an URL and browsers limit the length of an URL.

The above can explain why you only see the issue with the Angular (SPA) client application.

In addition, unless you’re using the legacy flows which imply that a scope of profile will return the full user information profile it’s highly unlikely that the regular claims associated with scope will reach that limit (when using the non-legacy flows that follow the OIDC specification in terms of the returned information).

The recommendation here would be to use non-legacy flows if you’re still using the legacy ones which could resolve this situation if the root cause for the size increase is non standard OIDC information that would no longer be included in the token. Have in mind that switching to this will mean the application will receive less information by default (which is a good thing) but you need to be aware of it. If this is not the reason behind this then you need to update your question with more troubleshooting information, including the exact Auth0.js configuration and methods used to request the token.


did you fixed it ? i have the same error