Skip to content

Commit 4827c43

Browse files
committed
Prepare for PR
1 parent b18ac85 commit 4827c43

11 files changed

Lines changed: 15 additions & 144 deletions

File tree

package-lock.json

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

playground/react/.env

Lines changed: 0 additions & 12 deletions
This file was deleted.

playground/react/.env.production

Lines changed: 0 additions & 3 deletions
This file was deleted.

playground/react/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ build
2525
*.njsproj
2626
*.sln
2727
*.sw?
28+
29+
.env.production
30+
.env

playground/react/README.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

playground/react/app/api/mock-oidc/.well-known/openid-configuration/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { NextRequest } from 'next/server';
22

33
export async function GET(req: NextRequest) {
4-
// const issuer = `${req.nextUrl.origin}/api/mock-oidc`;
5-
const issuer = 'http://host.docker.internal:3000/api/mock-oidc';
4+
let issuer = `${req.nextUrl.origin}/api/mock-oidc`;
5+
if (process.env.CORBADO_OIDC_MOCK_EXPLICIT_ISSUER) {
6+
issuer = process.env.CORBADO_OIDC_MOCK_EXPLICIT_ISSUER;
7+
}
68

79
return Response.json({
810
issuer,

playground/react/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import './.next/types/routes.d.ts';
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

playground/react/src/components/AuthButtons.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import SettingsContext from '../contexts/SettingsContext';
77
export const AuthButtons = () => {
88
const router = useRouter();
99
const { updateProjectId } = useContext(SettingsContext);
10-
const projectId =
11-
process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID_ManualTesting ||
12-
process.env.VITE_CORBADO_PROJECT_ID_ManualTesting ||
13-
'pro-1';
10+
const projectId = process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID || 'pro-1';
1411

1512
const navigateTo = (projectId: string, component: string) => {
1613
updateProjectId(projectId);

playground/react/src/components/Dropdown.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ import SettingsContext from '../contexts/SettingsContext';
55

66
const dropdownItems = [
77
{
8-
id:
9-
process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID_ManualTesting ||
10-
process.env.VITE_CORBADO_PROJECT_ID_ManualTesting ||
11-
'pro-1',
8+
id: process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID || 'pro-1',
129
label: 'Manual Testing',
1310
},
1411
{
15-
id:
16-
process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID_LocalDevelopment ||
17-
process.env.VITE_CORBADO_PROJECT_ID_LocalDevelopment ||
18-
'pro-1',
12+
id: process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID_LocalDevelopment || 'pro-1',
1913
label: 'Local Development',
2014
},
2115
].filter((item, index, all) => item.id && all.findIndex(x => x.id === item.id) === index);

playground/react/src/components/PlaygroundProviders.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { CorbadoProvider } from '@corbado/react';
44
import type { PropsWithChildren } from 'react';
55
import { useContext, useEffect } from 'react';
66
import SettingsContext, { SettingsProvider } from '../contexts/SettingsContext';
7-
import englishTranslations from '../translations/en';
8-
import frenchTranslations from '../translations/fr';
97

108
function CorbadoProviderWrapper({ children }: PropsWithChildren) {
119
const { darkMode, projectId } = useContext(SettingsContext);
@@ -24,21 +22,10 @@ function CorbadoProviderWrapper({ children }: PropsWithChildren) {
2422
return (
2523
<div key={`${projectId}-${darkMode}`}>
2624
<CorbadoProvider
27-
projectId={
28-
projectId ||
29-
process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID_ManualTesting ||
30-
process.env.VITE_CORBADO_PROJECT_ID_ManualTesting ||
31-
'pro-1'
32-
}
33-
// customTranslations={{
34-
// fr: frenchTranslations,
35-
// en: englishTranslations,
36-
// }}
25+
projectId={projectId || process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID || 'pro-1'}
3726
darkMode={darkMode ? 'on' : 'off'}
3827
isDevMode={true}
39-
frontendApiUrlSuffix={
40-
process.env.NEXT_PUBLIC_CORBADO_FRONTEND_API_URL_SUFFIX || process.env.VITE_CORBADO_FRONTEND_API_URL_SUFFIX
41-
}
28+
frontendApiUrlSuffix={process.env.NEXT_PUBLIC_CORBADO_FRONTEND_API_URL_SUFFIX}
4229
telemetry={{ debug: true }}
4330
observeEnabled={true}
4431
>

0 commit comments

Comments
 (0)