diff --git a/app/[...login]/page.tsx b/app/[...login]/page.tsx index 6ffea4f..aa23ac3 100644 --- a/app/[...login]/page.tsx +++ b/app/[...login]/page.tsx @@ -26,10 +26,6 @@ const LoginPage = ({ params }: { params: { login: string[] } }) => { // TODO: Move this to a config file. const domains = [ "@solun.pm", - "@6crypt.com", - "@seal.pm", - "@xolus.de", - "@cipher.pm", ]; const [suggestedDomain, setSuggestedDomain] = useState(""); diff --git a/app/forgot/page.tsx b/app/forgot/page.tsx index e7bd5b0..5c644ef 100644 --- a/app/forgot/page.tsx +++ b/app/forgot/page.tsx @@ -22,10 +22,6 @@ const LoginPage = () => { // TODO: Move this to a config file. const domains = [ "@solun.pm", - "@6crypt.com", - "@seal.pm", - "@xolus.de", - "@cipher.pm", ]; const [suggestedDomain, setSuggestedDomain] = useState(""); diff --git a/app/signup/page.tsx b/app/signup/page.tsx index 909ab47..14e2e5a 100644 --- a/app/signup/page.tsx +++ b/app/signup/page.tsx @@ -160,10 +160,6 @@ const RegisterPage = () => { // TODO: Move to config file. const domains = [ "@solun.pm", - "@6crypt.com", - "@seal.pm", - "@xolus.de", - "@cipher.pm", ]; return ( diff --git a/components/aliases/addAliasDialog.tsx b/components/aliases/addAliasDialog.tsx index 0fe368d..a5b3002 100644 --- a/components/aliases/addAliasDialog.tsx +++ b/components/aliases/addAliasDialog.tsx @@ -24,6 +24,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) = }, body: JSON.stringify({ user_id: userInfo.user_id, + token: localStorage.getItem("jwt"), }), }); @@ -39,6 +40,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) = }, body: JSON.stringify({ user_id: userInfo.user_id, + token: localStorage.getItem("jwt"), }), }); @@ -90,6 +92,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) = aliasName: aliasName, domain: selectedDomain, goto: finalGoto, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/aliases/aliasCard.tsx b/components/aliases/aliasCard.tsx index 291f854..ba3f89e 100644 --- a/components/aliases/aliasCard.tsx +++ b/components/aliases/aliasCard.tsx @@ -19,6 +19,7 @@ const AliasCard = ({ userInfo, aliasName, domain, isActive, goto, refreshAliases user_id: userInfo.user_id, fqa: fqa, alias_state: !isActive, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/domains/addDomainDialog.tsx b/components/domains/addDomainDialog.tsx index c855997..b2bfeb0 100644 --- a/components/domains/addDomainDialog.tsx +++ b/components/domains/addDomainDialog.tsx @@ -27,6 +27,7 @@ const AddDomainDialog = ({ isOpen, closeModal, userInfo, userDetails, refreshDom }, body: JSON.stringify({ domain: domain, + token: localStorage.getItem("jwt"), }), }); @@ -53,6 +54,7 @@ const AddDomainDialog = ({ isOpen, closeModal, userInfo, userDetails, refreshDom body: JSON.stringify({ user_id: userInfo.user_id, domain: domain, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/domains/domainSettingsTopBar.tsx b/components/domains/domainSettingsTopBar.tsx index b566864..bca97c1 100644 --- a/components/domains/domainSettingsTopBar.tsx +++ b/components/domains/domainSettingsTopBar.tsx @@ -27,6 +27,7 @@ const DomainSettingsTopBar = ({ domain_id, userInfo, userDetails, mailboxCount, body: JSON.stringify({ user_id: userInfo.user_id, domain_id: domain_id, + token: localStorage.getItem("jwt"), }), }) .then(async (res) => { @@ -65,6 +66,7 @@ const DomainSettingsTopBar = ({ domain_id, userInfo, userDetails, mailboxCount, body: JSON.stringify({ user_id: userInfo.user_id, domain_id: domain_id, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/domains/enableCatchAllDialog.tsx b/components/domains/enableCatchAllDialog.tsx index 0d3ab57..8ca4bdf 100644 --- a/components/domains/enableCatchAllDialog.tsx +++ b/components/domains/enableCatchAllDialog.tsx @@ -39,6 +39,7 @@ const enableCatchAll = async () => { user_id: userInfo.user_id, domain_id: domain_id, forwarding_addresses: forwardingAddresses, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/mailbox/addMailboxDialog.tsx b/components/mailbox/addMailboxDialog.tsx index 980c36e..80b349f 100644 --- a/components/mailbox/addMailboxDialog.tsx +++ b/components/mailbox/addMailboxDialog.tsx @@ -33,6 +33,7 @@ const AddMailboxDialog = ({ userInfo, isOpen, closeModal, domain, refreshMailbox body: JSON.stringify({ username: formData.username, domain: '@'+domain, // endpoint expects domain with @ + token: localStorage.getItem("jwt"), }), }) .then((response) => response.json()) @@ -86,7 +87,8 @@ const AddMailboxDialog = ({ userInfo, isOpen, closeModal, domain, refreshMailbox username: formData.username, password: password, confirm_password: confirmPassword, - quota: quota + quota: quota, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/mailbox/changeMailboxPassword.tsx b/components/mailbox/changeMailboxPassword.tsx index 66bb6b2..e47b39b 100644 --- a/components/mailbox/changeMailboxPassword.tsx +++ b/components/mailbox/changeMailboxPassword.tsx @@ -44,6 +44,7 @@ function ChangeMailboxPassword({ userInfo, domain_id, mailbox_id }: any) { mailbox_id: mailbox_id, currentPassword: currentPassword, newPassword: newPassword, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/mailbox/changeMailboxQuota.tsx b/components/mailbox/changeMailboxQuota.tsx index 71574d3..08dd37d 100644 --- a/components/mailbox/changeMailboxQuota.tsx +++ b/components/mailbox/changeMailboxQuota.tsx @@ -24,6 +24,7 @@ function ChangeMailboxQuota({ userInfo, userDetails, mailboxDetails, domain_id, domain_id: domain_id, mailbox_id: mailbox_id, quota: event.target.quota.value, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/mailbox/mailboxSettingsTopBar.tsx b/components/mailbox/mailboxSettingsTopBar.tsx index 82788c0..6cdd614 100644 --- a/components/mailbox/mailboxSettingsTopBar.tsx +++ b/components/mailbox/mailboxSettingsTopBar.tsx @@ -23,6 +23,7 @@ const MailboxSettingsTopBar = ({ userInfo, domain_id, mailbox_id, rateLimit }: user_id: userInfo.user_id, domain_id: domain_id, mailbox_id: mailbox_id, + token: localStorage.getItem("jwt"), }), }) .then(async (res) => { diff --git a/components/settings/apiAccess.tsx b/components/settings/apiAccess.tsx index 019883e..d0b980b 100644 --- a/components/settings/apiAccess.tsx +++ b/components/settings/apiAccess.tsx @@ -34,6 +34,7 @@ function ApiAccess({ userDetails, userApiDetails }: any) { body: JSON.stringify({ user_id: userDetails.user_id, api_access: !apiAccess, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/settings/changePassword.tsx b/components/settings/changePassword.tsx index 5a88d63..c8defc2 100644 --- a/components/settings/changePassword.tsx +++ b/components/settings/changePassword.tsx @@ -42,6 +42,7 @@ function ChangePassword({ userInfo }: any) { user_id: userInfo.user_id, currentPassword: currentPassword, newPassword: newPassword, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/settings/privacySettings.tsx b/components/settings/privacySettings.tsx index e731bb9..b33adab 100644 --- a/components/settings/privacySettings.tsx +++ b/components/settings/privacySettings.tsx @@ -191,6 +191,7 @@ function PrivacySettings({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, password: password, + token: localStorage.getItem("jwt"), }), }); @@ -255,6 +256,7 @@ function PrivacySettings({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, fast_login: !fastLogin, + token: localStorage.getItem("jwt"), }), }); @@ -281,6 +283,7 @@ function PrivacySettings({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, beta_features: !betaFeatures, + token: localStorage.getItem("jwt"), }), }); diff --git a/components/settings/recovery.tsx b/components/settings/recovery.tsx index e97565a..1812f4d 100644 --- a/components/settings/recovery.tsx +++ b/components/settings/recovery.tsx @@ -39,7 +39,7 @@ function accountRecovery({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, enableRecovery: !enableRecovery, - recoveryCode: recoveryCodeHash + recoveryCode: recoveryCodeHash, }), }); diff --git a/components/settings/twoFactorAuthSetup.tsx b/components/settings/twoFactorAuthSetup.tsx index b1bae1f..ed70c80 100644 --- a/components/settings/twoFactorAuthSetup.tsx +++ b/components/settings/twoFactorAuthSetup.tsx @@ -67,6 +67,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, secret: await encryptAuthPM(publicTotpSecret, password), + token: localStorage.getItem("jwt"), }), }); @@ -94,6 +95,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) { }, body: JSON.stringify({ user_id: userInfo.user_id, + token: localStorage.getItem("jwt"), }), }); @@ -132,6 +134,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) { body: JSON.stringify({ user_id: userInfo.user_id, password: password, + token: localStorage.getItem("jwt"), }), }); diff --git a/hooks/fetchUserInfo.tsx b/hooks/fetchUserInfo.tsx index 8083c8a..28ee712 100644 --- a/hooks/fetchUserInfo.tsx +++ b/hooks/fetchUserInfo.tsx @@ -41,6 +41,7 @@ export const useFetchUserInfo = () => { }, body: JSON.stringify({ user_id: data.user_id, + token: localStorage.getItem("jwt"), }), }); diff --git a/package-lock.json b/package-lock.json index 2297ab5..4611d22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "solun-auth", - "version": "0.3.60", + "version": "0.3.62", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "solun-auth", - "version": "0.3.60", + "version": "0.3.62", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", diff --git a/package.json b/package.json index 1d78dae..b0367d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "solun-auth", - "version": "0.3.60", + "version": "0.3.62", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/subpages/aliases.tsx b/pages/subpages/aliases.tsx index ed5cb77..67679ba 100644 --- a/pages/subpages/aliases.tsx +++ b/pages/subpages/aliases.tsx @@ -26,6 +26,7 @@ const AliasesPage = () => { }, body: JSON.stringify({ user_id: userInfo.user_id, + token: localStorage.getItem("jwt"), }), }); const data = await res.json(); diff --git a/pages/subpages/domain_settings.tsx b/pages/subpages/domain_settings.tsx index fe65e12..5715bca 100644 --- a/pages/subpages/domain_settings.tsx +++ b/pages/subpages/domain_settings.tsx @@ -29,6 +29,7 @@ const DomainSettingsPage = ({ id }: DomainSettingsPageProps) => { body: JSON.stringify({ user_id: userInfo.user_id, domain_id: id, + token: localStorage.getItem("jwt"), }), }); const data = await res.json(); @@ -49,6 +50,7 @@ const DomainSettingsPage = ({ id }: DomainSettingsPageProps) => { body: JSON.stringify({ user_id: userInfo.user_id, domain_id: id, + token: localStorage.getItem("jwt"), }), }); const data = await res.json(); diff --git a/pages/subpages/domains.tsx b/pages/subpages/domains.tsx index 668c627..8c8a872 100644 --- a/pages/subpages/domains.tsx +++ b/pages/subpages/domains.tsx @@ -25,6 +25,7 @@ const DomainsPage = () => { }, body: JSON.stringify({ user_id: userInfo.user_id, + token: localStorage.getItem("jwt"), }), }); const data = await res.json(); diff --git a/pages/subpages/mailbox_settings.tsx b/pages/subpages/mailbox_settings.tsx index 56fd532..3f1f273 100644 --- a/pages/subpages/mailbox_settings.tsx +++ b/pages/subpages/mailbox_settings.tsx @@ -24,6 +24,7 @@ const MailboxSettingsPage = ({domain_id, mailbox_id}: MailboxSettingsPageProps) user_id: userInfo.user_id, domain_id: domain_id, mailbox_id: mailbox_id, + token: localStorage.getItem("jwt"), }), }); const data = await res.json();