google 的 OAuth2 身份验证授权问题

Issue with grant for OAuth2 authentication with google

我正在使用 Grant 通过 google 进行 OAuth2 身份验证。我在 config.json 中提供了所有参数:

  {
    "server": {
    "protocol": "https",
    "host": "thooslo-com-shaunakde.c9.io"
  },
  "google":{
    "authorize_url": "https://accounts.google.com/o/oauth2/auth",
    "access_url": "https://accounts.google.com/o/oauth2/token",
    "oauth": 2,
    "custom_parameters": ["access_type"],
    "scope_delimiter":" ",
    "scope":["https://www.googleapis.com/auth/youtube","https://www.googleapis.com/auth/drive"],
    "client_id":"39109025743-veaeooi4v9ooirabeseujn8u2ohjbqf7.apps.googleusercontent.com",
    "client_secret":"DO8ozwoFqtP654jzi-wPQF10",
    "callback": "/users"
  }
  }

但它仍然拒绝发送所有参数。我收到 "client_id" not sent 错误。

我修改了库以打印出 URL,确实是这样:

Starting child process with 'node ./bin/www'
https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fthooslo-com-shaunakde.c9.io%2Fconnect%2Fgoogle%2Fcallback&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive
GET /connect/google 302 26.492 ms - 574

我确实设法让第一步工作了一次,通过一些排列,但后来失败了 client_secret not found。

我做错了什么吗?图书馆似乎没有马车。

有这个配置就够了

{
    "server": {
    "protocol": "https",
    "host": "thooslo-com-shaunakde.c9.io"
  },
  "google":{
    "key":"39109025743-veaeooi4v9ooirabeseujn8u2ohjbqf7.apps.googleusercontent.com",
    "secret":"DO8ozwoFqtP654jzi-wPQF10",
    "scope":[
      "https://www.googleapis.com/auth/youtube",
      "https://www.googleapis.com/auth/drive"
    ],
    "callback": "/users"
  }
}