【问题标题】:nextjs + auth / this site can’t provide a secure connectionnextjs + auth / 此站点无法提供安全连接
【发布时间】:2022-07-08 01:03:11
【问题描述】:

我的项目中存在安全连接问题。 波纹管我的设置和代码:

怎么了?

附言 我的代码基于本教程: https://thetechhulk.com/auth0-and-next-js-authentication-complete-guide

【问题讨论】:

  • 您需要在此处在您的问题中发布minimal reproducible example,并在任何其他网站上发布not a link
  • 请勿发布代码、数据、错误消息等的图片 - 将文本复制或输入到问题中。 How to Ask
  • 你的代码有问题,尝试 console.log() 你页面中的问题,同时检查你使用的协议httpshttp

标签: next.js auth0


【解决方案1】:

我遇到了类似的问题,问题是我的 NEXTAUTH_URL 指向 https://localhost:3000 而不是 http://localhost:3000

【讨论】:

    【解决方案2】:

    error image - chrome

    url 错误:“localhost:3000/api/auth/callbackerror=MUST+match+the+registered+callback+URL+for+this+application

    检查您的 Github OAuth 授权回调 URL

    Github Authorization Callback URL

    检查您的“.env.local”NEXTAUTH_URL

    这解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2017-09-06
      • 1970-01-01
      • 2020-11-25
      • 2021-10-22
      • 2017-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多