首页 > 解决方案 > Github OAuth 忽略 URL 中的范围参数,无法列出私有存储库

问题描述

这是针对“GitHub 应用程序”而不是“OAuth 应用程序”的。我正在尝试列出用户的私人回购。

我在 URL 中指定范围 在此处输入图像描述

我在 GitHub App 中指定权限:

在此处输入图像描述

在此处输入图像描述

, 约

OAuth 页面未显示正确的权限

在此处输入图像描述

GitHub 从最终 OAuth 步骤中不返回任何范围:

access_token: 'xxxxx'
scope: ''
token_type: 'bearer'

标签: oauthgithub-api

解决方案


范围不是 GitHub 应用 OAuth 端点的参数。它仅用于 OAuth 应用程序请参阅https://developer.github.com/enterprise/2.16/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/


推荐阅读