-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【又来请教啦大佬 登录 - cookie 缓存】 #27
Comments
照你自己想法调吧,oneTap 你不想要就去掉,用户没登录时才会调用oneTap触发右上角弹出谷歌登录的一键登录 |
明白啦 我说呢咋没登录 就走登录的逻辑 原来是右上角弹出来的登录感谢大佬!!
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2024年4月28日(星期天) 下午3:10
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [SoraWebui/SoraWebui] 【又来请教啦大佬 登录 - cookie 缓存】 (Issue #27)
照你自己想法调吧,oneTap 你不想要就去掉,用户没登录时才会调用oneTap触发右上角弹出谷歌登录的一键登录
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
除了 oneTap,上边的逻辑是点登录按钮触发,next-auth |
大佬 不忙了,帮忙看下呗 |
这是 APP router 不是 Pages router,自己去看 next 官网怎么获取数据的 |
加个微信?不怎么看 github 消息。这是我的微信号: DevShot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
async function init() { const user_id = sessionStorage.getItem("user_id"); if (user_id) { await getUserById(user_id); } else { if (status == 'authenticated') { await getUserByEmail(session.user.email); } else if (status == 'unauthenticated') { console.log('未验证'); setIntervalUserData(undefined); // https://www.npmjs.com/package/google-one-tap const options = { client_id: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID, // required auto_select: false, // optional cancel_on_tap_outside: false, // optional context: 'signin', // optional }; googleOneTap(options, (response) => { const token = response.credential; getUserOneTap(token); }); } } }
这个地方的 这段代码 我感觉 就没执行呀
googleOneTap(options, (response) => { const token = response.credential; Cookies.set("iuu_userInfo", 1111, { expires: 7 }); getUserOneTap(token); });
The text was updated successfully, but these errors were encountered: