Browse Source

fix auth cookies

main
matthew 2 years ago
parent
commit
6b3ab36591
  1. 10
      searching-front/app/blitz-client.ts

10
searching-front/app/blitz-client.ts

@ -1,11 +1,17 @@
import { AuthClientPlugin } from "@blitzjs/auth" // import { AuthClientPlugin } from "@blitzjs/auth"
import { setupBlitzClient } from "@blitzjs/next" import { setupBlitzClient } from "@blitzjs/next"
import { BlitzRpcPlugin } from "@blitzjs/rpc" import { BlitzRpcPlugin } from "@blitzjs/rpc"
const authStub = ()=>{
globalThis.__BLITZ_SESSION_COOKIE_PREFIX = "blitz";
return {events:{},middleware:{}, exports: ()=>({})}
}
// export const authConfig = { // export const authConfig = {
// cookiePrefix: "searching-front-cookie-prefix", // cookiePrefix: "searching-front-cookie-prefix",
// } // }
//AuthClientPlugin(authConfig) //AuthClientPlugin(authConfig)
export const { withBlitz } = setupBlitzClient({ export const { withBlitz } = setupBlitzClient({
plugins: [BlitzRpcPlugin({})], plugins: [authStub(),BlitzRpcPlugin({})],
}) })

Loading…
Cancel
Save