fix: remove oauth from embeds

This commit is contained in:
David Nguyen
2025-02-27 14:08:59 +11:00
parent 596d30e2e5
commit ad520bb032
7 changed files with 25 additions and 17 deletions

View File

@@ -16,9 +16,9 @@ export type EmbedAuthenticationRequiredProps = {
export const EmbedAuthenticationRequired = ({ export const EmbedAuthenticationRequired = ({
email, email,
returnTo, returnTo,
isGoogleSSOEnabled, // isGoogleSSOEnabled,
isOIDCSSOEnabled, // isOIDCSSOEnabled,
oidcProviderLabel, // oidcProviderLabel,
}: EmbedAuthenticationRequiredProps) => { }: EmbedAuthenticationRequiredProps) => {
return ( return (
<div className="flex min-h-[100dvh] w-full items-center justify-center"> <div className="flex min-h-[100dvh] w-full items-center justify-center">
@@ -35,9 +35,10 @@ export const EmbedAuthenticationRequired = ({
</Alert> </Alert>
<SignInForm <SignInForm
isGoogleSSOEnabled={isGoogleSSOEnabled} // Embed currently not supported.
isOIDCSSOEnabled={isOIDCSSOEnabled} // isGoogleSSOEnabled={isGoogleSSOEnabled}
oidcProviderLabel={oidcProviderLabel} // isOIDCSSOEnabled={isOIDCSSOEnabled}
// oidcProviderLabel={oidcProviderLabel}
className="mt-4" className="mt-4"
initialEmail={email} initialEmail={email}
returnTo={returnTo} returnTo={returnTo}

View File

@@ -17,6 +17,7 @@ function PosthogInit() {
if (postHogConfig) { if (postHogConfig) {
posthog.init(postHogConfig.key, { posthog.init(postHogConfig.key, {
api_host: postHogConfig.host, api_host: postHogConfig.host,
capture_exceptions: true,
}); });
} }
}, []); }, []);

View File

@@ -1,6 +1,7 @@
import { useEffect } from 'react'; import { useEffect } from 'react';
import Plausible from 'plausible-tracker'; import Plausible from 'plausible-tracker';
import posthog from 'posthog-js';
import { import {
Links, Links,
Meta, Meta,
@@ -180,6 +181,7 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
if (errorCode !== 404) { if (errorCode !== 404) {
console.error('[RootErrorBoundary]', error); console.error('[RootErrorBoundary]', error);
posthog.captureException(error);
} }
return <GenericErrorLayout errorCode={errorCode} />; return <GenericErrorLayout errorCode={errorCode} />;

View File

@@ -49,8 +49,8 @@
"luxon": "^3.4.0", "luxon": "^3.4.0",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"plausible-tracker": "^0.3.9", "plausible-tracker": "^0.3.9",
"posthog-js": "^1.223.3", "posthog-js": "^1.224.0",
"posthog-node": "^4.7.0", "posthog-node": "^4.8.1",
"react": "^18", "react": "^18",
"react-call": "^1.3.0", "react-call": "^1.3.0",
"react-dom": "^18", "react-dom": "^18",

View File

@@ -49,7 +49,9 @@ export const appMiddleware = async (c: Context, next: Next) => {
if (pathname.startsWith('/t/')) { if (pathname.startsWith('/t/')) {
debug.log('Setting preferred team url cookie'); debug.log('Setting preferred team url cookie');
setCookie(c, 'preferred-team-url', pathname.split('/')[2]); setCookie(c, 'preferred-team-url', pathname.split('/')[2], {
sameSite: 'lax',
});
return; return;
} }

17
package-lock.json generated
View File

@@ -131,8 +131,8 @@
"luxon": "^3.4.0", "luxon": "^3.4.0",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"plausible-tracker": "^0.3.9", "plausible-tracker": "^0.3.9",
"posthog-js": "^1.223.3", "posthog-js": "^1.224.0",
"posthog-node": "^4.7.0", "posthog-node": "^4.8.1",
"react": "^18", "react": "^18",
"react-call": "^1.3.0", "react-call": "^1.3.0",
"react-dom": "^18", "react-dom": "^18",
@@ -902,9 +902,9 @@
} }
}, },
"apps/remix/node_modules/posthog-node": { "apps/remix/node_modules/posthog-node": {
"version": "4.7.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-4.7.0.tgz", "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-4.8.1.tgz",
"integrity": "sha512-RgdUKSW8MfMOkjUa8cYVqWndNjPePNuuxlGbrZC6z1WRBsVc6TdGl8caidmC10RW8mu/BOfmrGbP4cRTo2jARg==", "integrity": "sha512-ApMEC1+DbctP/88+VhaCl8SRKpIoReibMf7Mb3rxw3yMthr1rKaM4opbHdZJ0buLhwS5zX8B2ckqLjpwpSjRPg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.7.4" "axios": "^1.7.4"
@@ -31060,9 +31060,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/posthog-js": { "node_modules/posthog-js": {
"version": "1.223.3", "version": "1.224.0",
"resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.223.3.tgz", "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.224.0.tgz",
"integrity": "sha512-ZQTc17M21IzkQmECJa2Xjont4tZrvIn252uGT3sTfmahTqZoW4j+kBj4eOJt9SNR6hOheFNkg7MSiI/rA6FaDA==", "integrity": "sha512-JT1XQQeYs0CKb4lU2vujmeLTDLWc61I5lT7d6oG/H/cnCpXAqBi5rMuCFFeotHeMy3hqJ/Tpu3eAPFE2p5ErHA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"core-js": "^3.38.1", "core-js": "^3.38.1",
@@ -41567,6 +41567,7 @@
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"pg": "^8.11.3", "pg": "^8.11.3",
"playwright": "1.43.0", "playwright": "1.43.0",
"posthog-js": "^1.224.0",
"react": "^18", "react": "^18",
"remeda": "^2.17.3", "remeda": "^2.17.3",
"sharp": "0.32.6", "sharp": "0.32.6",

View File

@@ -45,6 +45,7 @@
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"pg": "^8.11.3", "pg": "^8.11.3",
"playwright": "1.43.0", "playwright": "1.43.0",
"posthog-js": "^1.224.0",
"react": "^18", "react": "^18",
"remeda": "^2.17.3", "remeda": "^2.17.3",
"sharp": "0.32.6", "sharp": "0.32.6",