A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: logout using custom logout endpoint
thecodrra2c3ca4b8215
diff --git a/packages/core/api/token-manager.js b/packages/core/api/token-manager.jsindex 193894223..462aaff1f 100644--- a/packages/core/api/token-manager.js+++ b/packages/core/api/token-manager.js@@ -5,6 +5,7 @@ const ENDPOINTS = {token: "/connect/token",revoke: "/connect/revocation",temporaryToken: "/account/token",+ logout: "/account/logout",};class TokenManager {@@ -54,19 +55,13 @@ class TokenManager {async revokeToken() {const token = await this.getToken();if (!token) return;- const { access_token, refresh_token } = token;+ const { access_token } = token;- await http.post(`${constants.AUTH_HOST}${ENDPOINTS.revoke}`, {- token: access_token,- client_id: "notesnook",- token_type_hint: "access_token",- });-- await http.post(`${constants.AUTH_HOST}${ENDPOINTS.revoke}`, {- token: refresh_token,- client_id: "notesnook",- token_type_hint: "refresh_token",- });+ await http.post(+ `${constants.AUTH_HOST}${ENDPOINTS.logout}`,+ null,+ access_token+ );}saveToken(tokenResponse) {