下一个实体只能请求有效的绝对URL

发布于 2025-01-24 17:58:31 字数 582 浏览 0 评论 0原文

我更新了> [email  procepted] for okta sigejs sigejs sigejs sigejsn.apejs sigejs sigejs。之后,我会遇到以下错误:

[next-auth][error][SIGNIN_OAUTH_ERROR] https://next-auth.js.org/errors#signin_oauth_error only valid absolute URLs can be requested

请任何人帮助我摆脱困境。

I updated [email protected] to [email protected] for okta signin(reactjs). After that I am getting the following errors:

[next-auth][error][SIGNIN_OAUTH_ERROR] https://next-auth.js.org/errors#signin_oauth_error only valid absolute URLs can be requested

Please anyone help me get out of this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

缺⑴份安定 2025-01-31 17:58:31

另一个区别...域必须包括https://

Another difference... the domain has to include https://

走野 2025-01-31 17:58:31

确保从next-auth v3升级为v4后,还将传递的配置对象更新为oktaprovider

我的问题是我仍在使用,而新的API期望发行者

v3:

OktaProvider({
  clientId: data.REACT_APP_OKTA_CLIENTID,
  clientSecret: data.REACT_APP_OKTA_CLIENTSECRET,
  domain: data.REACT_APP_OKTA_DOMAIN, // <<<<<<<<<< before
}),

v4:

OktaProvider({
  clientId: data.REACT_APP_OKTA_CLIENTID,
  clientSecret: data.REACT_APP_OKTA_CLIENTSECRET,
  issuer: data.REACT_APP_OKTA_DOMAIN, // <<<<<<<<<< after
}),

Make sure that after you upgrade from next-auth v3 to v4, you also update the config object you're passing to OktaProvider.

The problem with me is that I was still using domain while the new API was expecting issuer.

v3:

OktaProvider({
  clientId: data.REACT_APP_OKTA_CLIENTID,
  clientSecret: data.REACT_APP_OKTA_CLIENTSECRET,
  domain: data.REACT_APP_OKTA_DOMAIN, // <<<<<<<<<< before
}),

v4:

OktaProvider({
  clientId: data.REACT_APP_OKTA_CLIENTID,
  clientSecret: data.REACT_APP_OKTA_CLIENTSECRET,
  issuer: data.REACT_APP_OKTA_DOMAIN, // <<<<<<<<<< after
}),
三岁铭 2025-01-31 17:58:31

确保您的Okta发行人看起来像这样:

https:// {your_okta_domain} .okta.com/oauth2/default

如果您在localhost中使用它,则在.env文件中使用它,请确保您在不包含它的情况下存储此变量“”。因此,将值存储为:

okta_issuer =“ my_okta_issuer”

而不是:

okta_issuer = my_okta_issuer,

而是我花了一天的时间来弄清楚这一点,但现在可以使用。

Make sure that your okta issuer looks like this:

https://{your_okta_domain}.okta.com/oauth2/default

Also if you are using it in localhost, in your .env file make sure that you store this variable without enclosing it in "". So instead of storing the value as:

OKTA_ISSUER = "my_okta_issuer"

use instead:

OKTA_ISSUER = my_okta_issuer

It took me a day to figure that out, but now it works.

江挽川 2025-01-31 17:58:31

很可能您错过了升级时错过了一步,建议您(re-)访问更新指南

您提供的描述非常小,很难给您一个有价值的答案。如果您以某种方式共享代码库,则可以通过github,a sandbox或a

Most probably you missed a step when upgrading, I suggest you (re-)visit the update guide

The description you provided is very minimal, making it hard to give you a valuable answer. If you share your codebase somehow, either via GitHub, a sandbox, or a minimal reproducible example, the community can help you better

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文