Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Fix the login loop when signing in after configuring angular router. #123

Merged

Conversation

nipunsampath
Copy link
Contributor

@nipunsampath nipunsampath commented Jul 7, 2022

Purpose

Fixes #122

Approach

The reason for the login loop is that the AsgardeoSignInRedirectComponent contains a signIn()method call inside the ngOnInit() method in order to get signInWithRedirect() method working. However, when Asgardeo redirect user back to the signInRedirectURL after login in, this signIn() method will be called again since ngOnInit() executes on every initilization of AsgardeoSignInRedirectComponent.

An additional check has been added before calling signIn() to skip the method call if the ngOnInit() method has been called on a redirect to resolve the issue.

@thivi thivi merged commit 16bdf08 into wso2-attic:main Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App gets stuck in a login loop when routing is configured.
2 participants