diff --git a/packages/hoppscotch-app/assets/icons/auth/email.svg b/packages/hoppscotch-app/assets/icons/auth/email.svg
new file mode 100644
index 000000000..cb9568f58
--- /dev/null
+++ b/packages/hoppscotch-app/assets/icons/auth/email.svg
@@ -0,0 +1,7 @@
+
+
diff --git a/packages/hoppscotch-app/assets/icons/auth/github.svg b/packages/hoppscotch-app/assets/icons/auth/github.svg
index 6269d1f81..451e6a291 100644
--- a/packages/hoppscotch-app/assets/icons/auth/github.svg
+++ b/packages/hoppscotch-app/assets/icons/auth/github.svg
@@ -1,6 +1,7 @@
-
-
+
+
diff --git a/packages/hoppscotch-app/assets/icons/auth/google.svg b/packages/hoppscotch-app/assets/icons/auth/google.svg
index 3998dad1a..75c59abdb 100644
--- a/packages/hoppscotch-app/assets/icons/auth/google.svg
+++ b/packages/hoppscotch-app/assets/icons/auth/google.svg
@@ -1,9 +1,7 @@
-
-
+
+
diff --git a/packages/hoppscotch-app/assets/icons/auth/microsoft.svg b/packages/hoppscotch-app/assets/icons/auth/microsoft.svg
new file mode 100644
index 000000000..d2f484f25
--- /dev/null
+++ b/packages/hoppscotch-app/assets/icons/auth/microsoft.svg
@@ -0,0 +1,11 @@
+
+
diff --git a/packages/hoppscotch-app/components/firebase/Login.vue b/packages/hoppscotch-app/components/firebase/Login.vue
index d687e4c99..3f850aa64 100644
--- a/packages/hoppscotch-app/components/firebase/Login.vue
+++ b/packages/hoppscotch-app/components/firebase/Login.vue
@@ -21,7 +21,13 @@
@click.native="signInWithGoogle"
/>
+
@@ -117,6 +123,7 @@ import { defineComponent } from "@nuxtjs/composition-api"
import {
signInUserWithGoogle,
signInUserWithGithub,
+ signInUserWithMicrosoft,
setProviderInfo,
currentUser$,
signInWithEmail,
@@ -144,6 +151,7 @@ export default defineComponent({
},
signingInWithGoogle: false,
signingInWithGitHub: false,
+ signingInWithMicrosoft: false,
signingInWithEmail: false,
mode: "sign-in",
}
@@ -234,6 +242,42 @@ export default defineComponent({
this.signingInWithGitHub = false
},
+ async signInWithMicrosoft() {
+ this.signingInWithMicrosoft = true
+
+ try {
+ await signInUserWithMicrosoft()
+ this.showLoginSuccess()
+ } catch (e) {
+ console.error(e)
+ // An error happened.
+ if (e.code === "auth/account-exists-with-different-credential") {
+ // Step 2.
+ // User's email already exists.
+ // The pending Microsoft credential.
+ const pendingCred = e.credential
+ this.$toast.info(`${this.$t("auth.account_exists")}`, {
+ duration: 0,
+ closeOnSwipe: false,
+ action: {
+ text: `${this.$t("action.yes")}`,
+ onClick: async (_, toastObject) => {
+ const { user } = await signInUserWithGithub()
+ await linkWithFBCredential(user, pendingCred)
+
+ this.showLoginSuccess()
+
+ toastObject.goAway(0)
+ },
+ },
+ })
+ } else {
+ this.$toast.error(`${this.$t("error.something_went_wrong")}`)
+ }
+ }
+
+ this.signingInWithMicrosoft = false
+ },
async signInWithEmail() {
this.signingInWithEmail = true
diff --git a/packages/hoppscotch-app/components/teams/Team.vue b/packages/hoppscotch-app/components/teams/Team.vue
index 71f46dcf7..79c28fb07 100644
--- a/packages/hoppscotch-app/components/teams/Team.vue
+++ b/packages/hoppscotch-app/components/teams/Team.vue
@@ -28,16 +28,26 @@
{{ team.name || t("state.nothing_found") }}
-
![]()
+ class="inline-flex"
+ >
+
![]()
+
+
diff --git a/packages/hoppscotch-app/helpers/fb/auth.ts b/packages/hoppscotch-app/helpers/fb/auth.ts
index 2756eb957..5da8229a9 100644
--- a/packages/hoppscotch-app/helpers/fb/auth.ts
+++ b/packages/hoppscotch-app/helpers/fb/auth.ts
@@ -6,6 +6,7 @@ import {
signInWithPopup,
GoogleAuthProvider,
GithubAuthProvider,
+ OAuthProvider,
signInWithEmailAndPassword as signInWithEmailAndPass,
isSignInWithEmailLink as isSignInWithEmailLinkFB,
fetchSignInMethodsForEmail,
@@ -203,6 +204,13 @@ export async function signInUserWithGithub() {
)
}
+/**
+ * Sign user in with a popup using Microsoft
+ */
+export async function signInUserWithMicrosoft() {
+ return await signInWithPopup(getAuth(), new OAuthProvider("microsoft.com"))
+}
+
/**
* Sign user in with email and password
*/
@@ -363,6 +371,9 @@ async function reauthenticateUser() {
} else if (currentAuthMethod === "github.com") {
const result = await signInUserWithGoogle()
credential = GoogleAuthProvider.credentialFromResult(result)
+ } else if (currentAuthMethod === "microsoft.com") {
+ const result = await signInUserWithMicrosoft()
+ credential = OAuthProvider.credentialFromResult(result)
} else if (currentAuthMethod === "password") {
const email = prompt(
"Reauthenticate your account using your current email:"
diff --git a/packages/hoppscotch-app/locales/af.json b/packages/hoppscotch-app/locales/af.json
index dd4df65fe..e5c2115a0 100644
--- a/packages/hoppscotch-app/locales/af.json
+++ b/packages/hoppscotch-app/locales/af.json
@@ -75,6 +75,7 @@
"continue_with_email": "Gaan voort met e -pos",
"continue_with_github": "Gaan voort met GitHub",
"continue_with_google": "Gaan voort met Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E -pos",
"logged_out": "Uitgeteken",
"login": "Teken aan",
diff --git a/packages/hoppscotch-app/locales/ar.json b/packages/hoppscotch-app/locales/ar.json
index 41ea476b5..e1facbfa6 100644
--- a/packages/hoppscotch-app/locales/ar.json
+++ b/packages/hoppscotch-app/locales/ar.json
@@ -76,6 +76,7 @@
"continue_with_email": "تواصل مع البريد الإلكتروني",
"continue_with_github": "تواصل مع جيثب",
"continue_with_google": "تواصل مع جوجل",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "بريد إلكتروني",
"logged_out": "تسجيل الخروج",
"login": "تسجيل الدخول",
diff --git a/packages/hoppscotch-app/locales/ca.json b/packages/hoppscotch-app/locales/ca.json
index 57a9f1c85..803fed421 100644
--- a/packages/hoppscotch-app/locales/ca.json
+++ b/packages/hoppscotch-app/locales/ca.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continueu amb el correu electrònic",
"continue_with_github": "Continueu amb GitHub",
"continue_with_google": "Continueu amb Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Correu electrònic",
"logged_out": "Desconnectat",
"login": "iniciar Sessió",
diff --git a/packages/hoppscotch-app/locales/cn.json b/packages/hoppscotch-app/locales/cn.json
index 847818107..406bc8d6f 100644
--- a/packages/hoppscotch-app/locales/cn.json
+++ b/packages/hoppscotch-app/locales/cn.json
@@ -75,6 +75,7 @@
"continue_with_email": "使用电子邮箱登录",
"continue_with_github": "使用 GitHub 登录",
"continue_with_google": "使用 Google 登录",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "电子邮箱地址",
"logged_out": "登出",
"login": "登录",
diff --git a/packages/hoppscotch-app/locales/cs.json b/packages/hoppscotch-app/locales/cs.json
index 90ad67619..3ef784e7a 100644
--- a/packages/hoppscotch-app/locales/cs.json
+++ b/packages/hoppscotch-app/locales/cs.json
@@ -75,6 +75,7 @@
"continue_with_email": "Pokračujte e -mailem",
"continue_with_github": "Pokračujte na GitHubu",
"continue_with_google": "Pokračovat s Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mailem",
"logged_out": "Odhlásit",
"login": "Přihlásit se",
diff --git a/packages/hoppscotch-app/locales/da.json b/packages/hoppscotch-app/locales/da.json
index 0243131c7..78a1f317f 100644
--- a/packages/hoppscotch-app/locales/da.json
+++ b/packages/hoppscotch-app/locales/da.json
@@ -75,6 +75,7 @@
"continue_with_email": "Fortsæt med e -mail",
"continue_with_github": "Fortsæt med GitHub",
"continue_with_google": "Fortsæt med Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E -mail",
"logged_out": "Logget ud",
"login": "Log på",
diff --git a/packages/hoppscotch-app/locales/de.json b/packages/hoppscotch-app/locales/de.json
index 7658cdbc4..65b30ccb0 100644
--- a/packages/hoppscotch-app/locales/de.json
+++ b/packages/hoppscotch-app/locales/de.json
@@ -75,6 +75,7 @@
"continue_with_email": "Weiter mit E-Mail",
"continue_with_github": "Weiter mit GitHub",
"continue_with_google": "Weiter mit Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Email",
"logged_out": "Abgemeldet",
"login": "Anmeldung",
diff --git a/packages/hoppscotch-app/locales/el.json b/packages/hoppscotch-app/locales/el.json
index 3a656693a..ba0eb7857 100644
--- a/packages/hoppscotch-app/locales/el.json
+++ b/packages/hoppscotch-app/locales/el.json
@@ -75,6 +75,7 @@
"continue_with_email": "Συνεχίστε με το Email",
"continue_with_github": "Συνεχίστε με το GitHub",
"continue_with_google": "Συνεχίστε με την Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "ΗΛΕΚΤΡΟΝΙΚΗ ΔΙΕΥΘΥΝΣΗ",
"logged_out": "Αποσυνδέθηκα",
"login": "Σύνδεση",
diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json
index 5c04f22e6..3e0b50aac 100644
--- a/packages/hoppscotch-app/locales/en.json
+++ b/packages/hoppscotch-app/locales/en.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continue with Email",
"continue_with_github": "Continue with GitHub",
"continue_with_google": "Continue with Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Email",
"logged_out": "Logged out",
"login": "Login",
diff --git a/packages/hoppscotch-app/locales/es.json b/packages/hoppscotch-app/locales/es.json
index 8ab5f3f34..c54b9bf24 100644
--- a/packages/hoppscotch-app/locales/es.json
+++ b/packages/hoppscotch-app/locales/es.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continuar con correo electrónico",
"continue_with_github": "Continuar con GitHub",
"continue_with_google": "Continuar con Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Correo electrónico",
"logged_out": "Desconectado",
"login": "Acceder",
diff --git a/packages/hoppscotch-app/locales/fi.json b/packages/hoppscotch-app/locales/fi.json
index 2170a60b4..e198d5071 100644
--- a/packages/hoppscotch-app/locales/fi.json
+++ b/packages/hoppscotch-app/locales/fi.json
@@ -75,6 +75,7 @@
"continue_with_email": "Jatka sähköpostilla",
"continue_with_github": "Jatka GitHubilla",
"continue_with_google": "Jatka Googlella",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Sähköposti",
"logged_out": "Kirjautunut ulos",
"login": "Kirjaudu sisään",
diff --git a/packages/hoppscotch-app/locales/fr.json b/packages/hoppscotch-app/locales/fr.json
index 936b8ee87..61a3d06c4 100644
--- a/packages/hoppscotch-app/locales/fr.json
+++ b/packages/hoppscotch-app/locales/fr.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continuer avec l'e-mail",
"continue_with_github": "Continuer avec GitHub",
"continue_with_google": "Continuer avec Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Déconnecté",
"login": "Connexion",
diff --git a/packages/hoppscotch-app/locales/he.json b/packages/hoppscotch-app/locales/he.json
index f5dcca90e..8f9f3cbe7 100644
--- a/packages/hoppscotch-app/locales/he.json
+++ b/packages/hoppscotch-app/locales/he.json
@@ -75,6 +75,7 @@
"continue_with_email": "המשך עם מייל",
"continue_with_github": "המשך עם GitHub",
"continue_with_google": "המשך עם גוגל",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "אימייל",
"logged_out": "התנתק",
"login": "התחברות",
diff --git a/packages/hoppscotch-app/locales/hu.json b/packages/hoppscotch-app/locales/hu.json
index 9f974859f..5b8fb5984 100644
--- a/packages/hoppscotch-app/locales/hu.json
+++ b/packages/hoppscotch-app/locales/hu.json
@@ -75,6 +75,7 @@
"continue_with_email": "Folytatás e-mail-címmel",
"continue_with_github": "Folytatás GitHub használatával",
"continue_with_google": "Folytatás Google használatával",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Kijelentkezett",
"login": "Bejelentkezés",
diff --git a/packages/hoppscotch-app/locales/it.json b/packages/hoppscotch-app/locales/it.json
index 9aa027f59..be7801eb7 100644
--- a/packages/hoppscotch-app/locales/it.json
+++ b/packages/hoppscotch-app/locales/it.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continua con e-mail",
"continue_with_github": "Continua con GitHub",
"continue_with_google": "Continua con Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Disconnesso",
"login": "Accedi",
diff --git a/packages/hoppscotch-app/locales/ja.json b/packages/hoppscotch-app/locales/ja.json
index 93125480b..868ba5f98 100644
--- a/packages/hoppscotch-app/locales/ja.json
+++ b/packages/hoppscotch-app/locales/ja.json
@@ -75,6 +75,7 @@
"continue_with_email": "メールを続ける",
"continue_with_github": "GitHubを続行します",
"continue_with_google": "Googleを続ける",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Eメール",
"logged_out": "ログアウトしました",
"login": "ログイン",
diff --git a/packages/hoppscotch-app/locales/ko.json b/packages/hoppscotch-app/locales/ko.json
index 5440fe5e2..d7c740ca9 100644
--- a/packages/hoppscotch-app/locales/ko.json
+++ b/packages/hoppscotch-app/locales/ko.json
@@ -75,6 +75,7 @@
"continue_with_email": "이메일로 계속",
"continue_with_github": "GitHub 계속하기",
"continue_with_google": "Google로 계속하기",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "이메일",
"logged_out": "로그아웃",
"login": "로그인",
diff --git a/packages/hoppscotch-app/locales/nl.json b/packages/hoppscotch-app/locales/nl.json
index a440d4cb6..876c1bba0 100644
--- a/packages/hoppscotch-app/locales/nl.json
+++ b/packages/hoppscotch-app/locales/nl.json
@@ -75,6 +75,7 @@
"continue_with_email": "Ga verder met e-mail",
"continue_with_github": "Ga verder met GitHub",
"continue_with_google": "Ga verder met Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Uitgelogd",
"login": "Log in",
diff --git a/packages/hoppscotch-app/locales/no.json b/packages/hoppscotch-app/locales/no.json
index ca81b661a..e0330d3ed 100644
--- a/packages/hoppscotch-app/locales/no.json
+++ b/packages/hoppscotch-app/locales/no.json
@@ -75,6 +75,7 @@
"continue_with_email": "Fortsett med e-post",
"continue_with_github": "Fortsett med GitHub",
"continue_with_google": "Fortsett med Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-post",
"logged_out": "Logget ut",
"login": "Logg inn",
diff --git a/packages/hoppscotch-app/locales/pl.json b/packages/hoppscotch-app/locales/pl.json
index d0adfb86b..1fccd77a9 100644
--- a/packages/hoppscotch-app/locales/pl.json
+++ b/packages/hoppscotch-app/locales/pl.json
@@ -75,6 +75,7 @@
"continue_with_email": "Kontynuuj z e-mailem",
"continue_with_github": "Kontynuuj z GitHub",
"continue_with_google": "Kontynuuj z Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Wylogowano",
"login": "Zaloguj sie",
diff --git a/packages/hoppscotch-app/locales/pt-br.json b/packages/hoppscotch-app/locales/pt-br.json
index f5ba79ea7..b40653cea 100644
--- a/packages/hoppscotch-app/locales/pt-br.json
+++ b/packages/hoppscotch-app/locales/pt-br.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continue com Email",
"continue_with_github": "Continue com GitHub",
"continue_with_google": "Continue com o Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Desconectado",
"login": "Conecte-se",
diff --git a/packages/hoppscotch-app/locales/pt.json b/packages/hoppscotch-app/locales/pt.json
index f5ba79ea7..b40653cea 100644
--- a/packages/hoppscotch-app/locales/pt.json
+++ b/packages/hoppscotch-app/locales/pt.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continue com Email",
"continue_with_github": "Continue com GitHub",
"continue_with_google": "Continue com o Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Desconectado",
"login": "Conecte-se",
diff --git a/packages/hoppscotch-app/locales/ro.json b/packages/hoppscotch-app/locales/ro.json
index 2a6322994..dd23f43fc 100644
--- a/packages/hoppscotch-app/locales/ro.json
+++ b/packages/hoppscotch-app/locales/ro.json
@@ -75,6 +75,7 @@
"continue_with_email": "Continuați cu e-mailul",
"continue_with_github": "Continuați cu GitHub",
"continue_with_google": "Continuați cu Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Delogat",
"login": "Autentificare",
diff --git a/packages/hoppscotch-app/locales/ru.json b/packages/hoppscotch-app/locales/ru.json
index f0ade5ff3..45296c765 100644
--- a/packages/hoppscotch-app/locales/ru.json
+++ b/packages/hoppscotch-app/locales/ru.json
@@ -75,6 +75,7 @@
"continue_with_email": "Продолжить с электронной почтой",
"continue_with_github": "Продолжить с GitHub",
"continue_with_google": "Продолжить с Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Электронное письмо",
"logged_out": "Вышли из",
"login": "Авторизоваться",
diff --git a/packages/hoppscotch-app/locales/sr.json b/packages/hoppscotch-app/locales/sr.json
index d58141513..513ce0b06 100644
--- a/packages/hoppscotch-app/locales/sr.json
+++ b/packages/hoppscotch-app/locales/sr.json
@@ -76,6 +76,7 @@
"continue_with_email": "Наставите са е -поштом",
"continue_with_github": "Наставите са ГитХуб -ом",
"continue_with_google": "Наставите са Гоогле -ом",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Емаил",
"logged_out": "Одјављени",
"login": "Пријавите се",
diff --git a/packages/hoppscotch-app/locales/sv.json b/packages/hoppscotch-app/locales/sv.json
index 315903b05..fb85a8bf9 100644
--- a/packages/hoppscotch-app/locales/sv.json
+++ b/packages/hoppscotch-app/locales/sv.json
@@ -75,6 +75,7 @@
"continue_with_email": "Fortsätt med e -post",
"continue_with_github": "Fortsätt med GitHub",
"continue_with_google": "Fortsätt med Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-post",
"logged_out": "Utloggad",
"login": "Logga in",
diff --git a/packages/hoppscotch-app/locales/tr.json b/packages/hoppscotch-app/locales/tr.json
index 7395b172e..51541a850 100644
--- a/packages/hoppscotch-app/locales/tr.json
+++ b/packages/hoppscotch-app/locales/tr.json
@@ -75,6 +75,7 @@
"continue_with_email": "E-posta ile devam et",
"continue_with_github": "GitHub ile devam et",
"continue_with_google": "Google ile devam",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-posta",
"logged_out": "Çıkış yapıldı",
"login": "Giriş yapmak",
diff --git a/packages/hoppscotch-app/locales/tw.json b/packages/hoppscotch-app/locales/tw.json
index de513d23a..9906d9e9c 100644
--- a/packages/hoppscotch-app/locales/tw.json
+++ b/packages/hoppscotch-app/locales/tw.json
@@ -75,6 +75,7 @@
"continue_with_email": "使用電子信箱登入",
"continue_with_github": "使用 GitHub 登入",
"continue_with_google": "使用 Google 登入",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "電子信箱地址",
"logged_out": "登出",
"login": "登入",
diff --git a/packages/hoppscotch-app/locales/uk.json b/packages/hoppscotch-app/locales/uk.json
index 25d15797f..75bdfce84 100644
--- a/packages/hoppscotch-app/locales/uk.json
+++ b/packages/hoppscotch-app/locales/uk.json
@@ -75,6 +75,7 @@
"continue_with_email": "Продовжити з електронною поштою",
"continue_with_github": "Продовжити з GitHub",
"continue_with_google": "Продовжуйте працювати з Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "Електронна пошта",
"logged_out": "Вийшли з системи",
"login": "Увійти",
diff --git a/packages/hoppscotch-app/locales/vi.json b/packages/hoppscotch-app/locales/vi.json
index d6403662a..6c7ce903c 100644
--- a/packages/hoppscotch-app/locales/vi.json
+++ b/packages/hoppscotch-app/locales/vi.json
@@ -75,6 +75,7 @@
"continue_with_email": "Tiếp tục với Email",
"continue_with_github": "Tiếp tục với GitHub",
"continue_with_google": "Tiếp tục với Google",
+ "continue_with_microsoft": "Continue with Microsoft",
"email": "E-mail",
"logged_out": "Đã đăng xuất",
"login": "Đăng nhập",
diff --git a/packages/hoppscotch-app/pages/profile.vue b/packages/hoppscotch-app/pages/profile.vue
index 7213f3a2a..11e4fb731 100644
--- a/packages/hoppscotch-app/pages/profile.vue
+++ b/packages/hoppscotch-app/pages/profile.vue
@@ -34,7 +34,11 @@
class="w-16 h-16 rounded-lg ring-primary ring-4"
:alt="`${currentUser.displayName}`"
/>
-
+