Unable to use glab due to "oauth2: "invalid_grant"" with fresh api scoped token
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "bug" label: - https://gitlab.com/gitlab-org/cli/-/issues/?label_name%5B%5D=type%3A%3Abug and verify the issue you're about to submit isn't a duplicate. ---> ### Checklist <!--Please test the latest versions, that will remove the possibility that you see a bug that is fixed in a newer version.--> - [x] I'm using the latest version of the extension (Run `glab --version`) - Extension version: glab 1.91.0 (266e9be2) - [x] Operating system and version: _14.8.1 (23J30)_ - [x] Gitlab.com or self-managed instance? _gitlab.com_ - [ ] GitLab version (if self-managed) _GitLab version here_ (Use the `version` endpoint, like this: gitlab.my-company.com/api/v4/version) - [x] I have performed `glab auth status` to check for authentication issues - [x] Run the command in debug mode (like `DEBUG=true glab mr list`) and attach any useful output ### Summary #7934 not addressed, can't authenticate. ### Environment - OS: Darwin 23.6.0 arm64 - SHELL: /bin/zsh - TERM: xterm-256color - GLAB: glab 1.91.0 (266e9be2)% ### Steps to reproduce * glab auth login * create a token * input a token * observe an error ### What is the current _bug_ behavior? can't auth ### What is the expected _correct_ behavior? can auth ### Relevant logs and/or screenshots ``` $ DEBUG=true glab auth login [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$] [git rev-parse --show-toplevel] [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$] - Signing into gitlab.com The minimum required scopes are 'api' and 'write_repository'. Generate a personal access token at https://gitlab.com/-/user_settings/personal_access_tokens?scopes=api,write_repository [git config credential.https://gitlab.com.helper] [git config credential.helper] - glab config set -h gitlab.com git_protocol https ✓ Configured Git protocol. - glab config set -h gitlab.com api_protocol https ✓ Configured API protocol. [git remote -v] ERROR Error using API: oauth2: "invalid_grant" "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.". ``` ### Possible fixes <!--If you can, link to the line of code that might be responsible for the problem-->
issue