diff --git a/client/auth/github/getAccessToken.js b/client/auth/github/getAccessToken.js index 880157e..3243265 100644 --- a/client/auth/github/getAccessToken.js +++ b/client/auth/github/getAccessToken.js @@ -12,11 +12,10 @@ * @param {string} params.redirectUrl - Github Redirect URL as listed in your oauth app settings: {@link https://datasquirel.com/docs} * @param {function(boolean): void} [params.setLoading] - React setState Function: sets whether the google login button is ready or not * @param {string[]} [params.scopes] - Scopes to be requested from the user - * @param {{key: string, value: string}[] | string} [params.extraUriParams] - Extra params to be added to the url * * @returns {void} - Return */ -module.exports = function getAccessToken({ clientId, redirectUrl, setLoading, scopes, extraUriParams }) { +module.exports = function getAccessToken({ clientId, redirectUrl, setLoading, scopes }) { /** * == Initialize * @@ -25,18 +24,7 @@ module.exports = function getAccessToken({ clientId, redirectUrl, setLoading, sc if (setLoading) setLoading(true); const scopeString = scopes ? scopes.join("%20") : "read:user"; - - const extraUriParamsString = extraUriParams - ? typeof extraUriParams == "string" - ? extraUriParams - : `?${Object.keys(extraUriParams) - .map((key) => `${key}=${extraUriParams[key]}`) - .join("&")}` - : ""; - - console.log("extraUriParamsString:", extraUriParamsString); - - const fetchUrl = `https://github.com/login/oauth/authorize?client_id=${clientId}&scope=${scopeString}&redirect_uri=${redirectUrl}${extraUriParamsString}`; + const fetchUrl = `https://github.com/login/oauth/authorize?client_id=${clientId}&scope=${scopeString}&redirect_uri=${redirectUrl}`; window.location.assign(fetchUrl); ////////////////////////////////////////////////////////////////////////////////// diff --git a/package.json b/package.json index 01e901b..bd1063d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.3.7", + "version": "1.3.8", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": {