Comparing JWT claims across ChatGPT, Velog, and OKKY
Compare JWT headers and claims observed in three services, and use the differences to choose token lifetimes, refresh identifiers, and signing keys.
I decoded JWTs from ChatGPT, Velog, and OKKY to compare which claims their tokens carried. The differences gave me a better starting point for deciding what to include in a club project’s access and refresh tokens.
These are sample tokens observed in May 2025. Identifiers and personal values are synthetic or masked. The examples show headers and payloads only.
Distinguish registered, public, and private claims
JWT calls the values in its payload claims. RFC 7519 describes three ways to name them. Registered claims have standard meanings, public claims use a collision-resistant name, and private claims are agreed by the parties exchanging the token. Registered names are optional at the JWT format level. An application or an authentication protocol can require specific ones. RFC 7519
| Registered name | Meaning | Example |
|---|---|---|
iss | Issuer | https://velog.io |
sub | Subject | access_token in the Velog sample |
aud | Intended audience | https://api.example.com |
exp | Expiration time | 1747210103 |
nbf | Earliest acceptable time | 1747210103 |
iat | Issued-at time | 1747123703 |
jti | JWT identifier | 123e4567-e89b-12d3-a456-426614174000 |
JWT date claims are NumericDate values in seconds since the Unix epoch. To avoid clashes between systems, register a public claim name or use a collision-resistant identifier such as a URI under a domain you control.
| Public claim | Example value |
|---|---|
https://example.com/profile | { "email": "user@example.com", "email_verified": true } |
https://example.com/auth | { "user_id": "example-user" } |
Private names can stay short when the issuer and consumer share a schema. user_id and roles are examples. Their meanings may differ if tokens from multiple issuers cross the same system boundary.
ChatGPT access token
The header specifies RS256 and includes a key ID. The payload includes an issuer and audience, a subject, scoped permissions, and namespaced profile and authentication data. These are observations from one sample and may differ in other clients or issuance flows.
1
2
3
4
5
{
"alg": "RS256",
"kid": "example-signing-key",
"typ": "JWT"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"aud": [
"https://api.openai.com/v1"
],
"client_id": "example-client",
"exp": 1748022144,
"https://api.openai.com/auth": {
"user_id": "example-user"
},
"https://api.openai.com/profile": {
"email": "user@example.com",
"email_verified": true
},
"iat": 1747158143,
"iss": "https://auth.openai.com",
"jti": "00000000-0000-4000-8000-000000000001",
"nbf": 1747158143,
"pwd_auth_time": 1743693952591,
"scp": [
"openid",
"email",
"profile",
"offline_access",
"model.request",
"model.read",
"organization.read",
"organization.write"
],
"session_id": "example-session",
"sub": "google-oauth2|000000000000000"
}
A key ID helps a verifier choose among public keys it already trusts, such as keys published by a configured issuer. The verifier still has to validate the signature and enforce the expected algorithm, issuer, audience, and time bounds for its application. A decoded claim by itself does not authenticate the caller.
Velog access and refresh tokens
The access token uses HS256 with a short payload. The observed issuer is velog.io, and this sample uses sub to mark it as an access token.
1
2
3
4
{
"alg": "HS256",
"typ": "JWT"
}
1
2
3
4
5
6
7
{
"user_id": "00000000-0000-4000-8000-000000000002",
"iat": 1747123703,
"exp": 1747210103,
"iss": "velog.io",
"sub": "access_token"
}
The refresh sample uses the same signing algorithm. Its payload identifies the user, carries a separate token_id, and has an expiration beyond that of the access token.
1
2
3
4
{
"alg": "HS256",
"typ": "JWT"
}
1
2
3
4
5
6
7
8
{
"user_id": "00000000-0000-4000-8000-000000000002",
"token_id": "00000000-0000-4000-8000-000000000003",
"iat": 1746635394,
"exp": 1749227394,
"iss": "velog.io",
"sub": "refresh_token"
}
The identifier gives a service a handle for looking up or revoking that refresh token if it maintains a server-side record. Its presence in the JWT does not prove how the service stores or revokes tokens.
OKKY access and refresh tokens
The access token uses HS512. Its payload contains numeric user, avatar, and person identifiers alongside a roles claim.
1
2
3
{
"alg": "HS512"
}
1
2
3
4
5
6
7
8
{
"userId": 100000,
"avatarId": 196433,
"personId": 210147,
"roles": "101",
"iat": 1747206444,
"exp": 1747210044
}
The refresh payload is smaller and carries a separate tokenId.
1
2
3
{
"alg": "HS512"
}
1
2
3
4
5
6
{
"tokenId": "00000000-0000-4000-8000-000000000004",
"userId": 100000,
"iat": 1747206444,
"exp": 1749798444
}
A signed JWT payload can be decoded by anyone who holds it. Internal identifiers, including sequential ones, are visible to that holder. I keep identifiers and personal data out unless the consumer has a concrete reason to use them.
Compare the sample designs
| Feature | ChatGPT | Velog | OKKY |
|---|---|---|---|
| Signing algorithm | RS256 | HS256 | HS512 |
kid | Present | Absent | Absent |
| User identifier | sub plus namespaced claims | user_id UUID | Numeric userId |
| Permissions | scp array | Absent in the sample | roles |
| Token type | Access token from a separate issuance flow | sub distinguishes access and refresh in the samples | Refresh sample has tokenId |
iss | Present | Present | Absent in the samples |
RS256 lets a verifier check a signature using a public key. With HMAC, the same secret is needed for signing and verification. That difference matters if several services verify incoming tokens and only the authentication service should issue them. A trusted set of public keys and a key ID can support rotation without sharing the signing key.
Velog and OKKY both show a refresh identifier and a narrow refresh payload. That is the part I want to borrow. In the club project I had focused on extending the access token’s exp. A shorter access lifetime paired with revocable refresh tokens gives the service a more specific way to end a session.
Decide what a verifier actually needs
- Keep access tokens short-lived enough for the service’s session and exposure requirements.
- Include a refresh identifier when you need to revoke just one refresh token, and back it with server-side state.
- Include only identity and authorization fields the consuming service needs.
- Use a fixed validation policy per token type and check the expected issuer and audience where the design requires them.
- Plan key rotation if multiple services verify tokens with a trusted public key set.
The exact claims and their current values belong to the issuer. I use these sample shapes to compare choices in my own design.