Fix extension auth deeplink (#143)

This commit is contained in:
Chris Estreich 2025-06-26 14:47:41 -07:00 committed by GitHub
parent b12271d91f
commit 3bface4ead
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 5 deletions

View file

@ -1,9 +1,11 @@
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXBpYy1jaGFtb2lzLTg1LmNsZXJrLmFjY291bnRzLmRldiQ
NEXT_PUBLIC_CLERK_FRONTEND_API=https://epic-chamois-85.clerk.accounts.dev
# https://clerk.com/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/authorized
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/authorized
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/authorized
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/authorized

View file

@ -23,6 +23,7 @@ export default async function AuthenticatedLayout({
// Set enhanced Sentry context for authenticated users.
const { userId, orgId, orgRole } = authResult;
setSentryUserContext({ id: userId, orgId, orgRole });
if (orgId && orgRole) {
setSentryOrganizationContext(orgId, orgRole);
}

View file

@ -0,0 +1,18 @@
'use client';
import { useEffect } from 'react';
import { LoaderCircle } from 'lucide-react';
export default function Page() {
useEffect(() => {
setTimeout(() => {
window.location.href = '/sign-in';
}, 1000);
}, []);
return (
<div className="flex justify-center">
<LoaderCircle className="animate-spin" />
</div>
);
}

View file

@ -23,7 +23,7 @@ export const AuthProvider = ({
<ClerkProvider
appearance={{ baseTheme }}
localization={localization}
afterSignOutUrl={'/sign-in'}
afterSignOutUrl={'/signed-out'}
>
<SentryUserContext />
{children}

View file

@ -7,6 +7,7 @@ const isUnprotectedRoute = createRouteMatcher([
'/extension/sign-in(.*)',
'/api/marketplace(.*)',
'/share(.*)',
'/signed-out(.*)',
'/',
]);