admin管理员组文章数量:1399887
I'm setting up authorization using nextjs next-auth in a sveltekit app. I want my users to be able to log into their accounts using Patreon. The Patreon authorization URL is . This link, however, defaults to opening in the Patreon app (on mobile), if a user has the app downloaded. The app cannot handle the sign in, so it kicks you right back out to your default browser. If your default browser is not the browser you started in, the authorization fails, I imagine because your browser is missing necessary cookies or something to that effect.
You can prevent Patreon from opening the app by ending the authorization URL in #no_universal_links
. My question is how to do just that.
Right now, my provider is set up as follows:
Patreon({
clientId: env.AUTH_PATREON_ID,
clientSecret: env.AUTH_PATREON_SECRET,
authorization: {
params: {
scope: 'identity identity[email] campaigns campaigns.members',
},
}
})
You can optionally set authorization.url, and I tried to do so using to no avail, perhaps because authjs adds stuff to the end of the URL but the fragment must go at the end.
Any help would be greatly appreciated! Thank you.
本文标签:
版权声明:本文标题:next.js - Adding a URL fragment to the authorization URL in authjs to prevent opening a mobile app - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744244665a2596952.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论