Skip to content

Commit 3a440b2

Browse files
committed
Note about client_id
1 parent 59d3691 commit 3a440b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/internals.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,12 @@ After the user is successfully authenticated, the response will be:
171171
```
172172

173173
We generate content for the `auth.toml` file with these values. We add some extra key/values to auth.toml when device authentication is enabled:
174-
- `client: "device"` This will help us distinguish between device authenticated auth.toml's and legacy auth.toml's.
174+
- `client: "device"` This will help us distinguish between device authenticated auth.toml's and legacy auth.toml's. Not to be confused with `client_id` parameter that is used in the http requests. (See below)
175175
- `expires_at: <expires_in> + <time()>` This value is required to determine whether the token is expired and needs refresh. This is missing in the token response so we add it by summing the `expires_in` in value with the current timestamp.
176176
- `refresh_url` This value is also missing in the device token response but is necessary for refreshing expired tokens. We create this field with value `<server>/auth/renew/token.toml/device/`.
177177

178178
The mechanism to refresh the token is the same as in the legacy browser authentication flow.
179+
180+
### Client ID for device authentication flow
181+
182+
The `client_id` parameter for device authentication can be configured by setting the environment variable `JULIA_PKG_AUTHENTICATION_DEVICE_CLIENT_ID`. This value defaults to `"device"`.

0 commit comments

Comments
 (0)