📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fixes
Blue Mouse77e70e73db5f
diff --git a/src/components/GoogleAuth.tsx b/src/components/GoogleAuth.tsxindex 5355282cd..153845d16 100644--- a/src/components/GoogleAuth.tsx+++ b/src/components/GoogleAuth.tsx@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'import Button from 'ui/Button'import GoogleGSVG from 'ui/icons/GoogleG'-interface IGoogleAuth {setIsLoading: (isLoading: boolean) => void,authSSO: any, // TODO add types@@ -36,4 +35,8 @@ const GoogleAuth: React.FC<IGoogleAuth> = ({ setIsLoading, authSSO, dontRemember)}+GoogleAuth.defaultProps = {+ dontRemember: false,+}+export default GoogleAuthdiff --git a/src/pages/Auth/Signup/Signup.container.tsx b/src/pages/Auth/Signup/Signup.container.tsxindex 20879c1b3..6322b069b 100644--- a/src/pages/Auth/Signup/Signup.container.tsx+++ b/src/pages/Auth/Signup/Signup.container.tsx@@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({authSSO: (dontRemember: boolean, t: (key: string) => string, callback: (res: any) => void) => {console.log('dispatching authSSO')dispatch(sagaActions.authSSO(dontRemember, t, callback))- }+ },})export default connect(null, mapDispatchToProps)(Signup)diff --git a/src/pages/Auth/Socialised/index.tsx b/src/pages/Auth/Socialised/index.tsxindex 0c96aca2d..c0a646cb0 100644--- a/src/pages/Auth/Socialised/index.tsx+++ b/src/pages/Auth/Socialised/index.tsx@@ -24,20 +24,20 @@ const Socialised = (): JSX.Element => {const _location = _replace(window.location.href, `${routes.socialised}#`, `${routes.socialised}?`)const { searchParams } = new URL(_location)- const state = searchParams.get('state')+ const hash = searchParams.get('state')const token = searchParams.get('access_token')- console.log(state, token)+ console.log(hash, token)useEffect(() => {const processCode = async () => {- if (!token || !state) {+ if (!token || !hash) {setIsError(true)return}try {- await processGoogleToken(token, state)+ await processGoogleToken(token, hash)} catch (reason) {setIsError(true)console.error(`[ERROR] Error while processing Google code: ${reason}`)diff --git a/src/redux/sagas/auth/workers/sso_auth.ts b/src/redux/sagas/auth/workers/sso_auth.tsindex a9ba9417f..d901e35f0 100644--- a/src/redux/sagas/auth/workers/sso_auth.ts+++ b/src/redux/sagas/auth/workers/sso_auth.ts@@ -1,6 +1,4 @@import { call, put, delay } from 'redux-saga/effects'-import _isObject from 'lodash/isPlainObject'-import _omit from 'lodash/omit'import UIActions from 'redux/reducers/ui'import { authActions } from 'redux/reducers/auth'@@ -10,8 +8,8 @@ import {getJWTByGoogleHash, generateGoogleAuthURL,} from 'api'import { setRefreshToken } from 'utils/refreshToken'-import sagaActions from '../../actions/index'import { openBrowserWindow } from 'utils/generic'+import sagaActions from '../../actions/index'const AUTH_WINDOW_WIDTH = 600const AUTH_WINDOW_HEIGHT = 800@@ -52,6 +50,7 @@ export default function* ssoAuth({ payload: { callback, dontRemember } }: any) {const {accessToken, refreshToken, user,} = yield call(getJWTByGoogleHash, uuid)+ authWindow.close()yield put(authActions.setDontRemember(dontRemember))@@ -71,6 +70,7 @@ export default function* ssoAuth({ payload: { callback, dontRemember } }: any) {yield put(sagaActions.loadSharedProjects())yield put(sagaActions.loadProjectAlerts())callback(true, false)+ return} catch (reason) {// Authentication is not finished yet}