diff --git a/src/router.js b/src/router.js index c23f6fff1..b1de007c0 100644 --- a/src/router.js +++ b/src/router.js @@ -181,10 +181,6 @@ router.beforeResolve((to, from, next) => { if (to.name === 'logout') { return next() } - // this is to prevent the router to add state back in the url when going to end page. - if (to.name === 'end') { - return next() - } if (!hasQueryParameters(to) && hasQueryParameters(from)) { return next({ name: to.name, query: from.query, hash: to.hash, params: to.params }) } diff --git a/src/views/Start/Start.vue b/src/views/Start/Start.vue index 98ddb73f8..7642319d6 100644 --- a/src/views/Start/Start.vue +++ b/src/views/Start/Start.vue @@ -22,8 +22,6 @@ import log from 'loglevel' import BoxLoader from '../../components/helpers/BoxLoader' import { OpenLoginHandler } from '../../handlers/Auth' -import { FORCE_POPUP_LOGIN_MODE } from '../../utils/enums' -import { isMobileOrTablet } from '../../utils/utils' export default { name: 'Start', @@ -47,7 +45,6 @@ export default { }, }, async created() { - let isPopupMode = false try { const { loginProvider, state, mfaLevel, sessionNamespace, ...rest } = this.$route.query const stateParams = JSON.parse(safeatob(state)) @@ -65,11 +62,7 @@ export default { this.whiteLabel = whiteLabel const openLoginHandler = await OpenLoginHandler.getInstance(whiteLabel, loginConfig, sessionNamespace) - if (FORCE_POPUP_LOGIN_MODE.includes(loginProvider) && isMobileOrTablet()) { - isPopupMode = true - openLoginHandler.openLoginInstance.options.uxMode = 'popup' - } - const data = await openLoginHandler.openLoginInstance.login({ + await openLoginHandler.openLoginInstance.login({ loginProvider, getWalletKey: true, appState: state, @@ -79,23 +72,8 @@ export default { }, curve: 'secp256k1', }) - if (isPopupMode && data) { - // changing this back to redirect for other login providers. - openLoginHandler.openLoginInstance.options.uxMode = 'redirect' - this.$router.push({ - name: 'end', - query: {}, - }) - } } catch (error) { log.info(error, 'something went wrong') - if (isPopupMode) { - this.$router.push({ - name: 'end', - query: {}, - hash: `#error=${error.message || 'something went wrong, please try again later'}`, - }) - } } }, }