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
Turns out that GitLab does not support an easy way to get the scopes of the current token. The above endpoint is not available in all flavours of GitLab and also it enumerates all the available tokens as opposed to the current one being used.
It would be good to have a way to validate that a token has all the right permissions i.e.
repo
andadmin:org
before it's used.For GitHub: a response header
X-OAuth-Scopes
is returned that includes the current scopes https://docs.github.com/en/developers/apps/scopes-for-oauth-appsFor GitLab: an API call should return the current scopes https://docs.gitlab.com/ce/api/personal_access_tokens.html
The text was updated successfully, but these errors were encountered: