mirror of
https://github.com/moollaza/repo-remover.git
synced 2026-04-25 16:55:49 +03:00
[GH-ISSUE #42] Verify OAuth token includes required scopes #6
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/repo-remover-moollaza#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @moollaza on GitHub (Oct 31, 2019).
Original GitHub issue: https://github.com/moollaza/repo-remover/issues/42
Background
TheTokenForm currently validates the token by making an API call to see if GitHub responds with a user, but it doesn't verify the token has the required scopes.
Without the requires scopes (repo, delete_repo) the user will not be able to archive/delete any repos.
Solution
Find a way to check the
X-OAuth-Scopesheader in the API response, insideTheTokenForm.vue. It should containdelete_repo, repo