Refresh token length should be configurable (currently hardcoded to 12) #45555
Unanswered
opxdelwin
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current behavior
Refresh tokens are hardcoded to 12 alphanumeric characters in
internal/models/refresh_token.go:Problem
12 characters is a short token for a credential that can live for days or weeks. While token rotation mitigates some risk, a stolen token within its reuse interval is still exploitable — and a longer token raises the bar meaningfully.
This also causes friction with client-side validation in some SDKs and native apps that expect tokens of a more typical length (e.g. 32+ chars).
Suggested fix
Either:
GOTRUE_REFRESH_TOKEN_LENGTH)References
All reactions