Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Handle local GH App redirect

Tomas Valenta7d84a9558a84
diff --git a/utils/github.ts b/utils/github.ts
index 5ab0560cf..4bade856c 100644
--- a/utils/github.ts
+++ b/utils/github.ts
@@ -8,5 +8,11 @@ export interface GitHubAccount {
export function configureGitHubApp() {
const url = new URL('https://github.com/apps/e2b-for-github/installations/new')
+
+ const hostname = window.location.hostname
+ const protocol = window.location.protocol
+ const redirectURI = `${protocol}//${hostname}/api/github/oauth`
+ url.searchParams.append('redirect_uri', redirectURI)
+
openPopupModal(url)
}