feat(#1003): closing stale 'authorize' windows | handling error, error_description, error_uri query params for oauth2 | clear authorize window cache for authorization_code oauth2 flow (#1719)

* feat(#1003): oauth2 support
---------

Co-authored-by: lohit-1 <lohit@usebruno.com>
This commit is contained in:
lohit
2024-03-11 01:51:55 +05:30
committed by GitHub
parent 86ddd2b9b0
commit 6a05321109
8 changed files with 202 additions and 16 deletions

View File

@@ -43,6 +43,13 @@ export const sendCollectionOauth2Request = async (collection, environment, colle
});
};
export const clearOauth2Cache = async (uid) => {
return new Promise((resolve, reject) => {
const { ipcRenderer } = window;
ipcRenderer.invoke('clear-oauth2-cache', uid).then(resolve).catch(reject);
});
};
export const fetchGqlSchema = async (endpoint, environment, request, collection) => {
return new Promise((resolve, reject) => {
const { ipcRenderer } = window;