Skip to content

Commit 094808a

Browse files
committed
Add POC with open api autogenerated client
1 parent 701f664 commit 094808a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2464
-1261
lines changed

console/src/lib/components/auth/button/AuthProviderButton.svelte

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
import GoogleIcon from "$lib/components/auth/GoogleIcon.svelte";
55
import GitlabIcon from "$lib/components/auth/GitlabIcon.svelte";
66
import GithubIcon from "$lib/components/auth/GithubIcon.svelte";
7-
import { AgentLabsApp } from "$lib/externals/agentlabs-js-sdk/agentlabs";
8-
import { getAuth, signInWithRedirect } from "$lib/externals/agentlabs-js-sdk/auth";
9-
import GoogleAuthProvider from "$lib/externals/agentlabs-js-sdk/auth-providers/google";
10-
import GitlabAuthProvider from "$lib/externals/agentlabs-js-sdk/auth-providers/gitlab";
11-
import GithubAuthProvider from "$lib/externals/agentlabs-js-sdk/auth-providers/github";
127
138
export let provider: AuthProvider;
149
@@ -29,52 +24,7 @@
2924
github: "Github"
3025
};
3126
32-
// This will be instantiated in the main layout after fetching project config
33-
const app = new AgentLabsApp({
34-
project: {
35-
id: "",
36-
slug: "something",
37-
name: "something"
38-
},
39-
signInMethods: {
40-
google: {
41-
id: "google",
42-
isEnabled: true,
43-
oauthSettings: {
44-
clientId:
45-
"1046622402922-2q425h1v1dmacgg2p4g0bj89f8un67q3.apps.googleusercontent.com"
46-
}
47-
}
48-
}
49-
});
50-
51-
const auth = getAuth(app);
52-
53-
const providerHandlerMap: Record<AuthProvider, () => void> = {
54-
google: () =>
55-
signInWithRedirect(
56-
auth,
57-
new GoogleAuthProvider([], auth.getOAuthSignInMethods().google)
58-
),
59-
gitlab: () =>
60-
signInWithRedirect(
61-
auth,
62-
new GitlabAuthProvider([], auth.getOAuthSignInMethods().gitlab)
63-
),
64-
github: () =>
65-
signInWithRedirect(
66-
auth,
67-
new GithubAuthProvider([], auth.getOAuthSignInMethods().github)
68-
)
69-
};
70-
71-
const handleLogin = () => {
72-
console.log(auth.getOAuthSignInMethods().google);
73-
74-
providerCurrentlyLoading = provider;
75-
76-
providerHandlerMap[provider]();
77-
};
27+
const handleLogin = () => {};
7828
</script>
7929

8030
<Button

console/src/lib/components/common/input/Input.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
</label>
3333
{/if}
3434
<input
35+
id={name}
3536
value={value}
3637
required={required}
3738
on:input={onInput}

console/src/lib/externals/agentlabs-js-sdk/agentlabs.ts

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

console/src/lib/externals/agentlabs-js-sdk/auth-providers/auth-providers.types.ts

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

console/src/lib/externals/agentlabs-js-sdk/auth-providers/github.ts

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

console/src/lib/externals/agentlabs-js-sdk/auth-providers/gitlab.ts

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

console/src/lib/externals/agentlabs-js-sdk/auth-providers/google.ts

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

0 commit comments

Comments
 (0)