Skip to content

Conversation

@thiva-k
Copy link
Contributor

@thiva-k thiva-k commented Nov 27, 2025

This pull request updates the authentication flow handling in the AsgardeoProvider component to support both Asgardeo V2 and non-V2 platforms. The main change is to properly differentiate between embedded flows and traditional OAuth flows for V2, ensuring that the sign-in process is triggered only when appropriate.

Authentication flow improvements:

  • In AsgardeoProvider.tsx, the logic for handling authentication parameters on redirect now checks for the V2 platform and distinguishes between embedded and traditional OAuth flows. For V2, it exchanges the OAuth code for tokens only if there is no flowId present in the URL or session storage, otherwise it follows the traditional OAuth callback for non-V2 platforms.

@asgardeo-github-bot
Copy link

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

// If non-V2 platform, use traditional OAuth callback handling
await signIn(
{callOnlyOnRedirect: true},
// authParams?.authorizationCode,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we remove the commented code if not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not handling it in this PR here since it was existing

@DonOmalVindula DonOmalVindula merged commit d8e1b6d into asgardeo:main Nov 28, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants