跳转至

验证

ZJUI-Learn 目前有几种方法可以进行用户认证。

谷歌 OAuth 2

首先,创建一个 Google Cloud 帐户,然后:

  • 点击控制台 登录控制台。
  • 创建一个项目然后进入APIs & Services
    • 前往 OAuth consent screen 并填写同意书。
    • 继续 Credentials 并创建一个新的 OAuth client ID
    • 选择Web application
    • 在授权的 JavaScript 来源下,单击 ADD URI 并添加您的域。
    • 在授权重定向 URI 下,单击 ADD URI 并添加 https://yourdomain.com/pl/oauth2callback,这是 Google OAuth 回调的路由。
    • 单击 Create,这将为您提供 Client IDClient Secret对这些值保密。

现在将密钥添加到 config.json

config.json
{
  "googleClientId": "Your Client ID key",
  "googleClientSecret": "Your Client Secret key",
  "googleRedirectUrl": "https://yourdomain.com/pl/oauth2callback",
  "hasOauth": true
}

您现在应该能够使用 Google 登录您的 ZJUI-Learn 实例。

长时指数

查看课程实例 LTI 文档 以了解有关 LTI 的更多信息。