Skip to content

Commit

Permalink
fix: logout not remove auth cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
zextraskapil committed Sep 5, 2022
1 parent f9190a4 commit 97bef7d
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 10 deletions.
12 changes: 3 additions & 9 deletions src/network/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { SHELL_APP_ID } from '../constants';
import { getSoapFetch } from './fetch';
import { goToLogin } from './go-to-login';

export const logout = (): Promise<void> =>
getSoapFetch(SHELL_APP_ID)('EndSession', {
_jsns: 'urn:zimbraAccount'
}).then(() => {
fetch('/?loginOp=logout')
.then((res) => res)
.then(goToLogin);
});
fetch('/logout')
.then((res) => res)
.then(goToLogin);
89 changes: 88 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
"error": "Something went wrong, please try again"
},
"timezone": {
"abu_dhabi_muscat": "{{value}} Abu Dhabi, Muscat",
"africa_algiers": "{{value}} West Central Africa",
"africa_cairo": "{{value}} Egypt",
"africa_casablanca": "{{value}} Casablanca",
Expand All @@ -257,6 +258,7 @@
"africa_sao_tome": "{{value}} Sao Tome",
"africa_tripoli": "{{value}} Tripoli",
"africa_windhoek": "{{value}} Namibia",
"alaska": "{{value}} Alaska",
"america_adak": "{{value}} Adak",
"america_anchorage": "{{value}} Alaska",
"america_araguaina": "{{value}} Araguaina",
Expand Down Expand Up @@ -292,6 +294,10 @@
"america_st_johns": "{{value}} Newfoundland",
"america_tijuana": "{{value}} Baja California",
"america_whitehorse": "{{value}} Yukon",
"amsterdam_berlin_bern_rome_stockholm_vienna": "{{value}} Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",
"anadyr_petropavlovsk_kamchatsky_rtz11": "{{value}} Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)",
"argentina": "{{value}} Argentina",
"arizona": "{{value}} Arizona",
"asia_almaty": "{{value}} Astana",
"asia_amman": "{{value}} Jordan",
"asia_baghdad": "{{value}} Iraq",
Expand Down Expand Up @@ -338,9 +344,12 @@
"asia_yangon": "{{value}} Yangon",
"asia_yekaterinburg": "{{value}} Ekaterinburg (RTZ 4)",
"asia_yerevan": "{{value}} Yerevan",
"asuncion": "{{value}} Asuncion",
"athens_beirut_bucharest_istanbul": "{{value}} Athens, Beirut, Bucharest, Istanbul",
"atlantic_azores": "{{value}} Azores",
"atlantic_cape_verde": "{{value}} Cape Verde Is.",
"atlantic_south_georgia": "{{value}} Mid-Atlantic",
"atlantic_time_canada": "{{value}} Atlantic Time (Canada)",
"australia_adelaide": "{{value}} Adelaide",
"australia_brisbane": "{{value}} Brisbane",
"australia_darwin": "{{value}} Darwin",
Expand All @@ -349,7 +358,36 @@
"australia_lord_howe": "{{value}} Lord_Howe",
"australia_perth": "{{value}} Perth",
"australia_sydney": "{{value}} Canberra, Melbourne, Sydney",
"azores": "{{value}} Azores",
"baja_california": "{{value}} Baja California",
"baku": "{{value}} Baku",
"bangkok_hanoi_jakarta": "{{value}} Bangkok, Hanoi, Jakarta",
"beijing_chongqing_hong_kong_urumqi": "{{value}} Beijing, Chongqing, Hong Kong, Urumqi",
"beirut": "{{value}} Beirut",
"belgrade_bratislava_budapest_ljubljana_prague": "{{value}} Belgrade, Bratislava, Budapest, Ljubljana, Prague",
"brasilia": "{{value}} Brasilia",
"britain_ireland_portugal": "{{value}} Britain, Ireland, Portugal",
"brussels_copenhagen_madrid_paris ": "{{value}} Brussels, Copenhagen, Madrid, Paris ",
"cape_verde_is": "{{value}} Cape Verde Is.",
"caracas": "{{value}} Caracas",
"casablanca": "{{value}} Casablanca",
"cayenne_fortaleza": "{{value}} Cayenne, Fortaleza",
"central_america": "{{value}} Central America",
"chennai_kolkata_mumbai_new_delhi": "{{value}} Chennai, Kolkata, Mumbai, New Delhi",
"chihuahua_la_paz_mazatlan": "{{value}} Chihuahua, La Paz, Mazatlan",
"chita": "{{value}} Chita",
"christmas_island": "{{value}} Christmas Island",
"colombia": "{{value}} Colombia",
"coordinated_universal_time": "{{value}} Coordinated Universal Time",
"cuiaba": "{{value}} Cuiaba",
"damascus": "{{value}} Damascus",
"darwin": "{{value}} Darwin",
"dateline": "{{value}} Dateline",
"dhaka": "{{value}} Dhaka",
"egypt": "{{value}} Egypt",
"ekaterinburg_rtz_4": "{{value}} Ekaterinburg (RTZ 4)",
"etc_gmt+12": "{{value}} Dateline",
"eucla": "{{value}} Eucla",
"europe_astrakhan": "{{value}} Astrakhan",
"europe_athens": "{{value}} Athens, Beirut, Bucharest, Istanbul",
"europe_belgrade": "{{value}} Belgrade, Bratislava, Budapest, Ljubljana, Prague",
Expand All @@ -367,7 +405,39 @@
"europe_saratov": "{{value}} Saratov",
"europe_volgograd": "{{value}} Volgograd",
"europe_warsaw": "{{value}} Sarajevo, Skopje, Warsaw, Zagreb",
"georgetown_la_paz_manaus_san_juan": "{{value}} Georgetown, La Paz, Manaus, San Juan",
"gmt_02": "{{value}} GMT-02",
"gmt_11": "{{value}} GMT-11",
"greenland": "{{value}} Greenland",
"guadalajara_mexico_city_monterrey ": "{{value}} Guadalajara, Mexico City, Monterrey ",
"harare_pretoria": "{{value}} Harare, Pretoria",
"hawaii": "{{value}} Hawaii",
"helsinki_kyiv_riga_sofia_tallinn_vilnius": "{{value}} Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",
"indian_mauritius": "{{value}} Port Louis",
"indiana_east": "{{value}} Indiana (East)",
"iraq": "{{value}} Iraq",
"irkutsk_rtz_7": "{{value}} Irkutsk (RTZ 7)",
"istanbul": "{{value}} Istanbul",
"jerusalem": "{{value}} Jerusalem",
"jordan": "{{value}} Jordan",
"kabul": "{{value}} Kabul",
"kaliningrad_rtz_1": "{{value}} Kaliningrad (RTZ 1)",
"kathmandu": "{{value}} Kathmandu",
"korea": "{{value}} Korea",
"krasnoyarsk_rtz_6": "{{value}} Krasnoyarsk (RTZ 6)",
"kuwait_riyadh": "{{value}} Kuwait, Riyadh",
"la_paz": "{{value}} La Paz",
"magadan": "{{value}} Magadan",
"manaus": "{{value}} Manaus",
"mid_atlantic": "{{value}} Mid-Atlantic",
"minsk": "{{value}} Minsk",
"monrovia": "{{value}} Monrovia",
"montevideo": "{{value}} Montevideo",
"moscow_st_petersburg_volgograd_rtz_2": "{{value}} Moscow, St. Petersburg, Volgograd (RTZ 2)",
"nairobi": "{{value}} Nairobi",
"namibia": "{{value}} Namibia",
"newfoundland": "{{value}} Newfoundland",
"nuku_alofa": "{{value}} Nuku’alofa",
"pacific_apia": "{{value}} Samoa",
"pacific_auckland": "{{value}} New Zealand",
"pacific_bougainville": "{{value}} Bougainville Standard Time",
Expand All @@ -381,8 +451,25 @@
"pacific_marquesas": "{{value}} Marquesas",
"pacific_midway": "{{value}} Samoa",
"pacific_norfolk": "{{value}} Norfolk",
"pacific_south_america": "{{value}} Pacific South America",
"pacific_tongatapu": "{{value}} Nuku’alofa",
"utc": "{{value}} Coordinated Universal Time"
"port_louis": "{{value}} Port Louis",
"pyongyang": "{{value}} Pyongyang",
"samoa": "{{value}} Samoa",
"sarajevo_skopje_warsaw_zagreb": "{{value}} Sarajevo, Skopje, Warsaw, Zagreb",
"saskatchewan": "{{value}} Saskatchewan",
"sri_jayawardenepura_kotte": "{{value}} Sri Jayawardenepura Kotte",
"tbilisi": "{{value}} Tbilisi",
"tehran": "{{value}} Tehran",
"us_canada_central": "{{value}} US/Canada Central",
"us_canada_eastern": "{{value}} US/Canada Eastern",
"us_canada_mountain": "{{value}} US/Canada Mountain",
"us_canada_pacific": "{{value}} US/Canada Pacific",
"utc": "{{value}} Coordinated Universal Time",
"vladivostok_magadan": "{{value}} vladivostok_magadan_rtz_9",
"west_central_africa": "{{value}} West Central Africa",
"yangon": "{{value}} Yangon",
"yerevan": "{{value}} Yerevan"
},
"user_quota": {
"limited": "You have filled {{quota}}% of the available space",
Expand Down

0 comments on commit 97bef7d

Please sign in to comment.