Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/mount_oauth_callback.js')
-rw-r--r--app/assets/javascripts/ide/mount_oauth_callback.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/mount_oauth_callback.js b/app/assets/javascripts/ide/mount_oauth_callback.js
new file mode 100644
index 00000000000..79fffb24f8e
--- /dev/null
+++ b/app/assets/javascripts/ide/mount_oauth_callback.js
@@ -0,0 +1,12 @@
+import { oauthCallback } from '@gitlab/web-ide';
+import { getBaseConfig, getOAuthConfig } from './lib/gitlab_web_ide';
+
+export const mountOAuthCallback = () => {
+ const el = document.getElementById('ide');
+
+ return oauthCallback({
+ ...getBaseConfig(),
+ username: gon.current_username,
+ auth: getOAuthConfig(el.dataset),
+ });
+};