You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e40f20e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(oauth): request the scopes the extension and CLI actually need
Servers that enforce OAuth scopes (from 2.38) refused the extension right
after sign-in: `/users/me` needs `user:read`. Request what the extension
and the CLI it runs need: the `coder:workspaces.operate` and
`coder:workspaces.access` composites, `workspace:create`, `user:read` and
`user:read_personal`.
Request `inbox_notification:read` only when the server lists it in
`scopes_supported`, since servers reject unknown scopes and 2.38 does not
offer it yet.
Store `coder:all` when the server returns no scope, as servers that ignore
scopes grant everything, so later scope changes do not sign their users
out. Sessions stored with the old list sign in again once.
Revoke tokens on logout even when their scopes are outdated, and accept
sessions granted `coder:all`.
0 commit comments