{#if step > 1}
diff --git a/frontend/src/lib/components/AppConnectInner.svelte b/frontend/src/lib/components/AppConnectInner.svelte
index dbe162fd64..e568589b49 100644
--- a/frontend/src/lib/components/AppConnectInner.svelte
+++ b/frontend/src/lib/components/AppConnectInner.svelte
@@ -31,6 +31,7 @@
export let isGoogleSignin = false
export let disabled = false
export let manual = true
+ export let express = false
let isValid = true
@@ -81,10 +82,7 @@
let pathError = ''
- let expressOAuthSetup = false
-
- export async function open(rt?: string, express?: boolean) {
- expressOAuthSetup = express ?? false
+ export async function open(rt?: string) {
if (!rt) {
loadResourceTypes()
}
@@ -95,12 +93,12 @@
valueToken = undefined
await loadConnects()
manual = !connects?.includes(resourceType)
- if (manual && expressOAuthSetup) {
+ if (manual && express) {
dispatch('error', 'Express OAuth setup is not available for non OAuth resource types')
return
}
if (rt) {
- if (!manual && expressOAuthSetup) {
+ if (!manual && express) {
await getScopesAndParams()
step = 2
}
@@ -171,7 +169,6 @@
}
function popupListener(event) {
- console.log('popupListener', event.data, event.origin, window.location.origin)
let data = event.data
if (event.origin == null || event.origin !== window.location.origin) {
return
@@ -187,7 +184,7 @@
value = data.res.access_token!
valueToken = data.res
step = 4
- if (expressOAuthSetup) {
+ if (express) {
path = `u/${$userStore?.username}/${resourceType}_${new Date().getTime()}`
next()
}
@@ -329,252 +326,254 @@
let editScopes = false
- a.localeCompare(b))
- .map((key) => ({
- key
- }))
- : undefined}
- bind:filteredItems={filteredConnects}
- f={(x) => x.key}
-/>
- a[0].localeCompare(b[0]))}
- bind:filteredItems={filteredConnectsManual}
- f={(x) => x[0]}
-/>
-{#if step == 1}
-
-
-
-
-
OAuth APIs
-
- {#if filteredConnects}
- {#each filteredConnects as { key }}
-
- {/each}
- {:else}
- {#each new Array(3) as _}
-
- {/each}
- {/if}
-
- {#if connects && connects.length == 0}
-
No OAuth APIs has been setup on the instance. To add oauth APIs, first sync the resource
- types with the hub, then add oauth configuration. See documentation
-
Click connect to create a resource backed by an oauth connection, whose token is fetched from
- the external services and refreshed automatically if needed before expiration (using its
- refresh token)
-
Description
-
-
-
Scopes
- {#if editScopes}
-
- {:else}
-
- {#each scopes as scope}
-
- {scope}
+
OAuth APIs
+
+ {#if filteredConnects}
+ {#each filteredConnects as { key }}
+
{/each}
+ {:else}
+ {#each new Array(3) as _}
+
+ {/each}
+ {/if}
+
+ {#if connects && connects.length == 0}
+
No OAuth APIs has been setup on the instance. To add oauth APIs, first sync the resource
+ types with the hub, then add oauth configuration. See documentation
- 1. A secret variable containing the {apiTokenApps[resourceType]?.linkedSecret ?? 'token'}
- {truncateRev(value, 5, '*****')}
- will be stored a
- {path}.
-
-
- 2. The resource containing that token will be stored at the same path {path}. The Variable and Resource will be "linked together", they will be deleted and renamed
- together.
-
Click connect to create a resource backed by an oauth connection, whose token is fetched
+ from the external services and refreshed automatically if needed before expiration (using
+ its refresh token)
+ 1. A secret variable containing the {apiTokenApps[resourceType]?.linkedSecret ?? 'token'}
+ {truncateRev(value, 5, '*****')}
+ will be stored a
+ {path}.
+
+
+ 2. The resource containing that token will be stored at the same path {path}. The Variable and Resource will be "linked together", they will be deleted and renamed
+ together.
+