小编esd*_*esd的帖子

Next.js 12 + Supabase 项目错误“不存在保存会话的存储选项”

我正在使用 Supabase 和 Next.js 12.3.4 开发一个项目,并且我已经使用本教程设置了 Google 登录:Supabase Login with Google。当我运行项目时,终端反复警告

No storage option exists to persist the session, which may result in unexpected behavior when using auth.
        If you want to set persistSession to true, please provide a storage option or you may set persistSession to false to disable this warning.
Run Code Online (Sandbox Code Playgroud)

这是登录代码:

import supabaseClient from "./supabaseClient";

export default async function signInWithGoogle() {
    const { data, error } = await supabaseClient.auth.signInWithOAuth({
        provider: 'google',
        options: {
            redirectTo: 'http://localhost:3000/account'
        } …
Run Code Online (Sandbox Code Playgroud)

next.js supabase-js

5
推荐指数
2
解决办法
5700
查看次数

标签 统计

next.js ×1

supabase-js ×1