@eventcatalog/core 2.43.0 → 2.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-4DXH4NAT.js → chunk-63AEX7TR.js} +1 -1
- package/dist/{chunk-IZ7E57FH.js → chunk-AHBMOYOU.js} +1 -1
- package/dist/{chunk-MXNHNGRS.js → chunk-MJG5DK3Z.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.auth.d.cts +4 -0
- package/dist/eventcatalog.auth.d.ts +4 -0
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/auth.config.ts +28 -0
- package/eventcatalog/src/components/Header.astro +1 -1
- package/eventcatalog/src/pages/auth/login.astro +163 -122
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-63AEX7TR.js";
|
|
4
|
+
import "../chunk-AHBMOYOU.js";
|
|
5
|
+
import "../chunk-MJG5DK3Z.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { OAuthUserConfig } from '@auth/core/providers';
|
|
2
2
|
import { GitHubProfile } from '@auth/core/providers/github';
|
|
3
3
|
import { OktaProfile } from '@auth/core/providers/okta';
|
|
4
|
+
import { Auth0Profile } from '@auth/core/providers/auth0';
|
|
5
|
+
import { MicrosoftEntraIDProfile } from '@auth/core/providers/microsoft-entra-id';
|
|
4
6
|
|
|
5
7
|
interface EventCatalogAuthConfig {
|
|
6
8
|
providers?: {
|
|
7
9
|
github?: OAuthUserConfig<GitHubProfile>;
|
|
8
10
|
okta?: OAuthUserConfig<OktaProfile>;
|
|
11
|
+
auth0?: OAuthUserConfig<Auth0Profile>;
|
|
12
|
+
entra?: OAuthUserConfig<MicrosoftEntraIDProfile>;
|
|
9
13
|
};
|
|
10
14
|
customAuthConfig?: string;
|
|
11
15
|
customMiddleware?: string;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { OAuthUserConfig } from '@auth/core/providers';
|
|
2
2
|
import { GitHubProfile } from '@auth/core/providers/github';
|
|
3
3
|
import { OktaProfile } from '@auth/core/providers/okta';
|
|
4
|
+
import { Auth0Profile } from '@auth/core/providers/auth0';
|
|
5
|
+
import { MicrosoftEntraIDProfile } from '@auth/core/providers/microsoft-entra-id';
|
|
4
6
|
|
|
5
7
|
interface EventCatalogAuthConfig {
|
|
6
8
|
providers?: {
|
|
7
9
|
github?: OAuthUserConfig<GitHubProfile>;
|
|
8
10
|
okta?: OAuthUserConfig<OktaProfile>;
|
|
11
|
+
auth0?: OAuthUserConfig<Auth0Profile>;
|
|
12
|
+
entra?: OAuthUserConfig<MicrosoftEntraIDProfile>;
|
|
9
13
|
};
|
|
10
14
|
customAuthConfig?: string;
|
|
11
15
|
customMiddleware?: string;
|
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-DCLTVJDP.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-63AEX7TR.js";
|
|
10
|
+
import "./chunk-AHBMOYOU.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-EXAALOQA.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MJG5DK3Z.js";
|
|
19
19
|
import {
|
|
20
20
|
isAuthEnabled,
|
|
21
21
|
isBackstagePluginEnabled,
|
|
@@ -5,6 +5,8 @@ import Okta from '@auth/core/providers/okta';
|
|
|
5
5
|
import type { Account, Profile, User, Session } from '@auth/core/types';
|
|
6
6
|
import { isAuthEnabled, isSSR } from '@utils/feature';
|
|
7
7
|
import Google from '@auth/core/providers/google';
|
|
8
|
+
import Auth0 from '@auth/core/providers/auth0';
|
|
9
|
+
import Entra from '@auth/core/providers/microsoft-entra-id';
|
|
8
10
|
|
|
9
11
|
// Need to try and read the eventcatalog.auth.js file and get the auth providers from there
|
|
10
12
|
const catalogDirectory = process.env.PROJECT_DIR || process.cwd();
|
|
@@ -53,6 +55,32 @@ const getAuthProviders = async () => {
|
|
|
53
55
|
console.log('✅ Okta provider configured');
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
// Auth0 provider
|
|
59
|
+
if (authConfig.providers?.auth0) {
|
|
60
|
+
const auth0Config = authConfig.providers.auth0;
|
|
61
|
+
providers.push(
|
|
62
|
+
Auth0({
|
|
63
|
+
clientId: auth0Config.clientId,
|
|
64
|
+
clientSecret: auth0Config.clientSecret,
|
|
65
|
+
issuer: auth0Config.issuer,
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
console.log('✅ Auth0 provider configured');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Microsoft Entra ID provider
|
|
72
|
+
if (authConfig.providers?.entra) {
|
|
73
|
+
const entraConfig = authConfig.providers.entra;
|
|
74
|
+
providers.push(
|
|
75
|
+
Entra({
|
|
76
|
+
clientId: entraConfig.clientId,
|
|
77
|
+
clientSecret: entraConfig.clientSecret,
|
|
78
|
+
issuer: entraConfig.issuer,
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
console.log('✅ Microsoft Entra ID provider configured');
|
|
82
|
+
}
|
|
83
|
+
|
|
56
84
|
if (providers.length === 0) {
|
|
57
85
|
console.warn('⚠️ No auth providers configured');
|
|
58
86
|
}
|
|
@@ -50,7 +50,7 @@ const repositoryUrl = catalog?.repositoryUrl || 'https://github.com/event-catalo
|
|
|
50
50
|
aria-expanded="false"
|
|
51
51
|
aria-haspopup="true"
|
|
52
52
|
>
|
|
53
|
-
{session.user?.image ? (
|
|
53
|
+
{session.user?.image && !session.user?.image?.includes('googleusercontent.com') ? (
|
|
54
54
|
<img
|
|
55
55
|
src={session.user.image}
|
|
56
56
|
alt={session.user?.name || 'User'}
|
|
@@ -33,13 +33,13 @@ if (session) {
|
|
|
33
33
|
const providerConfig = {
|
|
34
34
|
github: {
|
|
35
35
|
name: 'GitHub',
|
|
36
|
-
icon: `<svg class="
|
|
36
|
+
icon: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
|
37
37
|
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path>
|
|
38
38
|
</svg>`,
|
|
39
39
|
},
|
|
40
40
|
google: {
|
|
41
41
|
name: 'Google',
|
|
42
|
-
icon: `<svg class="
|
|
42
|
+
icon: `<svg class="w-5 h-5" viewBox="0 0 24 24">
|
|
43
43
|
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
|
|
44
44
|
<path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
|
|
45
45
|
<path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
|
|
@@ -48,10 +48,18 @@ const providerConfig = {
|
|
|
48
48
|
},
|
|
49
49
|
okta: {
|
|
50
50
|
name: 'Okta',
|
|
51
|
-
icon: `<svg class="
|
|
51
|
+
icon: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
|
52
52
|
<path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18c-4.418 0-8-3.582-8-8s3.582-8 8-8 8 3.582 8 8-3.582 8-8 8zm-1-13h2v6h-2V7zm0 8h2v2h-2v-2z"></path>
|
|
53
53
|
</svg>`,
|
|
54
54
|
},
|
|
55
|
+
auth0: {
|
|
56
|
+
name: 'Auth0',
|
|
57
|
+
icon: `<svg class="w-5 h-5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="none"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill="#000000" d="M12.549 1h-4.55l1.407 4.38h4.548l-3.68 2.61 1.406 4.405c2.37-1.725 3.143-4.336 2.274-7.016L12.55 1zM2.045 5.38h4.55L8 1H3.45L2.045 5.38c-.868 2.68-.094 5.29 2.275 7.015L5.725 7.99l-3.68-2.612zm2.275 7.015L8 15l3.68-2.605L8 9.745l-3.68 2.65z"></path></g></svg>`,
|
|
58
|
+
},
|
|
59
|
+
entra: {
|
|
60
|
+
name: 'Microsoft',
|
|
61
|
+
icon: `<svg class="w-5 h-5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="none"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill="#F35325" d="M1 1h6.5v6.5H1V1z"></path><path fill="#81BC06" d="M8.5 1H15v6.5H8.5V1z"></path><path fill="#05A6F0" d="M1 8.5h6.5V15H1V8.5z"></path><path fill="#FFBA08" d="M8.5 8.5H15V15H8.5V8.5z"></path></g></svg>`,
|
|
62
|
+
},
|
|
55
63
|
};
|
|
56
64
|
---
|
|
57
65
|
|
|
@@ -69,145 +77,177 @@ const providerConfig = {
|
|
|
69
77
|
<style>
|
|
70
78
|
body {
|
|
71
79
|
font-family: 'Inter', sans-serif;
|
|
80
|
+
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
|
72
81
|
}
|
|
73
82
|
</style>
|
|
74
83
|
</head>
|
|
75
|
-
<body class="
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<div class="
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</a>
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<!-- GitHub Link -->
|
|
93
|
-
<div class="flex items-center">
|
|
94
|
-
<a
|
|
95
|
-
href="https://github.com/event-catalog/eventcatalog"
|
|
96
|
-
target="_blank"
|
|
97
|
-
class="text-gray-500 hover:text-gray-600 focus:outline-none focus:text-gray-600"
|
|
98
|
-
>
|
|
99
|
-
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
|
|
100
|
-
<path
|
|
101
|
-
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"
|
|
102
|
-
></path>
|
|
103
|
-
</svg>
|
|
104
|
-
</a>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
84
|
+
<body class="min-h-screen">
|
|
85
|
+
<div class="flex min-h-screen flex-col items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
|
|
86
|
+
<!-- Logo at the top -->
|
|
87
|
+
<div class="mb-8">
|
|
88
|
+
{
|
|
89
|
+
logo && (
|
|
90
|
+
<div class="flex flex-col items-center space-y-4">
|
|
91
|
+
<img alt={logo.alt} src={logo.src} class="w-12 h-12" />
|
|
92
|
+
<h1 class="text-2xl font-bold text-gray-900">{title}</h1>
|
|
93
|
+
</div>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
107
96
|
</div>
|
|
108
|
-
</nav>
|
|
109
97
|
|
|
110
|
-
<!-- Content with top padding to account for fixed header -->
|
|
111
|
-
<div class="flex min-h-screen flex-col items-center justify-center py-12 px-4 sm:px-6 lg:px-8 pt-24 bg-gray-50">
|
|
112
98
|
{
|
|
113
99
|
shouldShowLogin ? (
|
|
114
|
-
<div class="w-full max-w-md
|
|
115
|
-
<div class="
|
|
116
|
-
<
|
|
117
|
-
|
|
100
|
+
<div class="w-full max-w-md">
|
|
101
|
+
<div class="bg-white rounded-xl shadow-lg border border-gray-100 p-8 space-y-6">
|
|
102
|
+
<div class="text-center">
|
|
103
|
+
<h2 class="text-2xl font-bold text-gray-900">Sign in to your account</h2>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div class="space-y-4">
|
|
107
|
+
{providers.map((provider) => {
|
|
108
|
+
const config = providerConfig[provider as keyof typeof providerConfig];
|
|
109
|
+
if (!config) return null;
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<button
|
|
113
|
+
data-provider={provider}
|
|
114
|
+
class="provider-login-btn flex w-full items-center justify-center rounded-lg border border-gray-200 bg-white px-4 py-3 text-sm font-medium text-gray-700 shadow-sm hover:bg-purple-50 hover:border-purple-200 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 transition-all duration-200"
|
|
115
|
+
>
|
|
116
|
+
<span class="mr-3" set:html={config.icon} />
|
|
117
|
+
Sign in with {config.name}
|
|
118
|
+
</button>
|
|
119
|
+
);
|
|
120
|
+
})}
|
|
121
|
+
</div>
|
|
118
122
|
</div>
|
|
119
123
|
|
|
120
|
-
<div class="mt-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Sign in with {config.name}
|
|
132
|
-
</button>
|
|
133
|
-
);
|
|
134
|
-
})}
|
|
124
|
+
<div class="mt-6 text-center">
|
|
125
|
+
<p class="text-gray-600 text-sm">
|
|
126
|
+
Missing integration?
|
|
127
|
+
<a
|
|
128
|
+
href="https://github.com/event-catalog/eventcatalog/issues"
|
|
129
|
+
target="_blank"
|
|
130
|
+
class="text-purple-600 hover:text-purple-700 underline font-medium"
|
|
131
|
+
>
|
|
132
|
+
Let us know
|
|
133
|
+
</a>
|
|
134
|
+
</p>
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
) : hasConfigButNoProviders ? (
|
|
138
|
-
<div class="w-full max-w-2xl
|
|
139
|
-
<div class="
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
<div class="w-full max-w-2xl">
|
|
139
|
+
<div class="bg-white rounded-xl shadow-lg border border-gray-100 p-8 space-y-6">
|
|
140
|
+
<div class="text-center">
|
|
141
|
+
<h2 class="text-2xl font-bold text-gray-900">No Authentication Providers Configured</h2>
|
|
142
|
+
<p class="mt-4 text-gray-600">
|
|
143
|
+
Authentication is enabled but no providers are configured in your auth configuration file.
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="bg-purple-50 border border-purple-100 rounded-lg p-6 space-y-4">
|
|
148
|
+
<h3 class="text-lg font-semibold text-gray-900">To add authentication providers:</h3>
|
|
149
|
+
<ol class="list-decimal list-inside space-y-2 text-gray-700">
|
|
150
|
+
<li>
|
|
151
|
+
Update your{' '}
|
|
152
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">eventcatalog.auth.js</code>{' '}
|
|
153
|
+
file to include at least one provider (GitHub, Google, Okta, etc.)
|
|
154
|
+
</li>
|
|
155
|
+
<li>Configure the provider with the necessary credentials and settings</li>
|
|
156
|
+
<li>Restart your EventCatalog server to apply the changes</li>
|
|
157
|
+
</ol>
|
|
158
|
+
</div>
|
|
145
159
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
</
|
|
153
|
-
|
|
154
|
-
<li>Restart your EventCatalog server to apply the changes</li>
|
|
155
|
-
</ol>
|
|
160
|
+
<div class="text-center">
|
|
161
|
+
<a
|
|
162
|
+
href="#"
|
|
163
|
+
class="inline-flex items-center px-6 py-3 border border-transparent text-sm font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 transition-colors duration-200"
|
|
164
|
+
>
|
|
165
|
+
Read Authentication Documentation
|
|
166
|
+
</a>
|
|
167
|
+
</div>
|
|
156
168
|
</div>
|
|
157
169
|
|
|
158
|
-
<div class="text-center">
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
170
|
+
<div class="mt-6 text-center">
|
|
171
|
+
<p class="text-gray-600 text-sm">
|
|
172
|
+
Missing integration?
|
|
173
|
+
<a
|
|
174
|
+
href="https://github.com/event-catalog/eventcatalog/issues"
|
|
175
|
+
target="_blank"
|
|
176
|
+
class="text-purple-600 hover:text-purple-700 underline font-medium"
|
|
177
|
+
>
|
|
178
|
+
Let us know
|
|
179
|
+
</a>
|
|
180
|
+
</p>
|
|
165
181
|
</div>
|
|
166
182
|
</div>
|
|
167
183
|
) : (
|
|
168
|
-
<div class="w-full max-w-2xl
|
|
169
|
-
<div class="
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
184
|
+
<div class="w-full max-w-2xl">
|
|
185
|
+
<div class="bg-white rounded-xl shadow-lg border border-gray-100 p-8 space-y-6">
|
|
186
|
+
<div class="text-center">
|
|
187
|
+
<h2 class="text-2xl font-bold text-gray-900">Authentication Not Configured</h2>
|
|
188
|
+
<p class="mt-4 text-gray-600">
|
|
189
|
+
{!hasAuthConfigurationFile
|
|
190
|
+
? 'No authentication configuration file found.'
|
|
191
|
+
: 'Authentication is not properly enabled.'}
|
|
192
|
+
</p>
|
|
193
|
+
</div>
|
|
177
194
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
<div class="bg-purple-50 border border-purple-100 rounded-lg p-6 space-y-4">
|
|
196
|
+
<h3 class="text-lg font-semibold text-gray-900">To enable authentication:</h3>
|
|
197
|
+
<ol class="list-decimal list-inside space-y-2 text-gray-700">
|
|
198
|
+
{!hasAuthConfigurationFile && (
|
|
199
|
+
<li>
|
|
200
|
+
Create an{' '}
|
|
201
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">eventcatalog.auth.js</code>{' '}
|
|
202
|
+
configuration file in your project root
|
|
203
|
+
</li>
|
|
204
|
+
)}
|
|
205
|
+
{!isSSR() && (
|
|
206
|
+
<li>
|
|
207
|
+
Enable SSR (Server-Side Rendering) in your{' '}
|
|
208
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">
|
|
209
|
+
eventcatalog.config.js
|
|
210
|
+
</code>{' '}
|
|
211
|
+
file by setting{' '}
|
|
212
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">output: 'server'</code>
|
|
213
|
+
</li>
|
|
214
|
+
)}
|
|
215
|
+
{!isAuthEnabled() && (
|
|
216
|
+
<li>
|
|
217
|
+
Enable authentication in your{' '}
|
|
218
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">
|
|
219
|
+
eventcatalog.config.js
|
|
220
|
+
</code>{' '}
|
|
221
|
+
file by setting{' '}
|
|
222
|
+
<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm font-mono">
|
|
223
|
+
auth: {`{ enabled: true }`}
|
|
224
|
+
</code>
|
|
225
|
+
</li>
|
|
226
|
+
)}
|
|
227
|
+
</ol>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="text-center">
|
|
231
|
+
<a
|
|
232
|
+
href="#"
|
|
233
|
+
class="inline-flex items-center px-6 py-3 border border-transparent text-sm font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 transition-colors duration-200"
|
|
234
|
+
>
|
|
235
|
+
Read Authentication Documentation
|
|
236
|
+
</a>
|
|
237
|
+
</div>
|
|
202
238
|
</div>
|
|
203
239
|
|
|
204
|
-
<div class="text-center">
|
|
205
|
-
<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
240
|
+
<div class="mt-6 text-center">
|
|
241
|
+
<p class="text-gray-600 text-sm">
|
|
242
|
+
Missing integration?
|
|
243
|
+
<a
|
|
244
|
+
href="https://github.com/event-catalog/eventcatalog/issues"
|
|
245
|
+
target="_blank"
|
|
246
|
+
class="text-purple-600 hover:text-purple-700 underline font-medium"
|
|
247
|
+
>
|
|
248
|
+
Let us know
|
|
249
|
+
</a>
|
|
250
|
+
</p>
|
|
211
251
|
</div>
|
|
212
252
|
</div>
|
|
213
253
|
)
|
|
@@ -225,7 +265,8 @@ const providerConfig = {
|
|
|
225
265
|
providerButtons.forEach((button) => {
|
|
226
266
|
const provider = button.getAttribute('data-provider');
|
|
227
267
|
if (provider) {
|
|
228
|
-
|
|
268
|
+
let providerId = provider === 'entra' ? 'microsoft-entra-id' : provider;
|
|
269
|
+
button.addEventListener('click', () => signIn(providerId));
|
|
229
270
|
}
|
|
230
271
|
});
|
|
231
272
|
</script>
|