Sanic-JWT-Extended icon indicating copy to clipboard operation
Sanic-JWT-Extended copied to clipboard

There maybe a bug in create_refresh_token when store private_claims

Open beruhan opened this issue 4 years ago • 0 comments

I create refresh token with private_claims,like this {"username":"test"},After refreshing token,I found the private_claims's keys has a dot prefix,like this {".username":"test"} The bug code as fllows:

for k, v in private_claims.items():
    payload[f"{private_claim_prefix}.{k}"] = v

Maybe this is correct:

for k, v in private_claims.items():
    payload[private_claim_prefix + k] = v

beruhan avatar Feb 05 '21 02:02 beruhan