小编Ema*_*eim的帖子

Next JS - Supabase 错误:AuthApiError:无效的刷新令牌:已使用

我正在尝试在 Next JS 项目中实现 Supabase Auth

现在我遇到以下错误,该错误在以下情况下不断重复I npm run dev

[AuthApiError: Invalid Refresh Token: Already Used]{
 __isAuthError: true,
name: 'AuthApiError',
status: 400
}
Run Code Online (Sandbox Code Playgroud)

这是我的中间件.ts

import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs";
import { Database } from "./types";

const locales = ["en", "ar"];
const defaultLocale = "en";
const PUBLIC_FILE = /\.(.*)$/;

export async function middleware(req: NextRequest) {
  const res = NextResponse.next();
  const supabase = createMiddlewareClient<Database>({ req, res …
Run Code Online (Sandbox Code Playgroud)

next.js supabase next.js13

8
推荐指数
0
解决办法
675
查看次数

标签 统计

next.js ×1

next.js13 ×1

supabase ×1