Skip to content
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

Cant´see Clerk layout - "Third-party cookie will be blocked #18

Open
innovashion opened this issue Apr 11, 2024 · 2 comments
Open

Cant´see Clerk layout - "Third-party cookie will be blocked #18

innovashion opened this issue Apr 11, 2024 · 2 comments

Comments

@innovashion
Copy link

Chrome browser is blocking Clerk as it says "Third-party cookie will be blocked. As a result you cannot see or use Clerk application within the web.

@Oliver-1311
Copy link

https://developers.google.com/privacy-sandbox/3pcd?hl=es-419, le recomiendo leer este articulo donde se menciona el bloqueo de cookies de terceros en 2024.
ahora en cuanto no pueda utilizar clerk, es probanble que:

  • si usa src/ archivo middleware.ts tiene que estar en la carpeta /src y no en la raíz del proyecto
  • authMiddleware esta desfasado y ahora se usa clerkMiddleware() a diferencia del primero que proteje todas las rutas por defecto clerkMiddleware() no proteje ninguna ruta por defecto. por ello tiene que hacer esto en middleware.ts:
// para proteger la ruta / que es la home y todas las rutas de credits
const isProtectedRoute = createRouteMatcher(["/", "/credits(.*)"]);

export default clerkMiddleware((auth, req) => {
  if (isProtectedRoute(req)) auth().protect();
});
export const config = {
  matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};

@Ice-wiz
Copy link

Ice-wiz commented Jun 4, 2024

facing the same thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants