SSO login bug fixed

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-10-19 20:23:15 +05:30 committed by Krishan
parent 5b1d5d0326
commit 5f6667debf

View file

@ -95,7 +95,8 @@ function Auth() {
const baseUrl = localStorage.getItem(cons.secretKey.BASE_URL); const baseUrl = localStorage.getItem(cons.secretKey.BASE_URL);
auth.loginWithToken(baseUrl, loginToken) auth.loginWithToken(baseUrl, loginToken)
.then(() => { .then(() => {
window.location.replace('/'); const { href } = window.location;
window.location.replace(href.slice(0, href.indexOf('?')));
}) })
.catch((error) => { .catch((error) => {
changeProcess(null); changeProcess(null);
@ -314,7 +315,7 @@ function Auth() {
</form> </form>
</div> </div>
<div className="flex--center"> <div style={{ flexDirection: 'column' }} className="flex--center">
<Text variant="b2"> <Text variant="b2">
{`${(type === 'login' ? 'Don\'t have' : 'Already have')} an account?`} {`${(type === 'login' ? 'Don\'t have' : 'Already have')} an account?`}
<button <button
@ -328,6 +329,9 @@ function Auth() {
{ type === 'login' ? ' Register' : ' Login' } { type === 'login' ? ' Register' : ' Login' }
</button> </button>
</Text> </Text>
<span style={{ marginTop: 'var(--sp-extra-tight)' }}>
<Text variant="b3">v1.3.2</Text>
</span>
</div> </div>
</StaticWrapper> </StaticWrapper>
</> </>