feat: inbuilt routing between Embeeded & Redirect based sign-in#75
Merged
brionmario merged 10 commits intoasgardeo:mainfrom Jun 27, 2025
Merged
feat: inbuilt routing between Embeeded & Redirect based sign-in#75brionmario merged 10 commits intoasgardeo:mainfrom
Embeeded & Redirect based sign-in#75brionmario merged 10 commits intoasgardeo:mainfrom
Conversation
…nInButton behavior
- Updated SignInButton to handle sign-in via server actions and improved routing. - Refactored SignOutButton to utilize server actions for sign-out functionality. - Enhanced AsgardeoContext to support asynchronous signIn and signOut methods. - Introduced Asgardeo middleware for handling authentication in Next.js applications. - Created server actions for sign-in, sign-out, user retrieval, and session management. - Implemented error handling and response management for authentication actions. - Updated client configuration to support new authentication flow and environment variables. - Modified sample applications to demonstrate new authentication components and middleware.
…nOutButton, adding loading states, and improving error handling chore: remove unused authRouter file and clean up middleware logic fix: update AsgardeoContext and related types to support optional properties
…s and update Dashboard pages
…eplacing getMeProfile references
…nhance AsgardeoLoading and SignedIn components with CSR remarks; clean up FieldFactory and BaseCreateOrganization components
NipuniBhagya
approved these changes
Jun 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces several enhancements and fixes across multiple files in the JavaScript SDK for Asgardeo, focusing on improving configuration management, adding new features, and updating documentation. The most significant changes include the addition of a new
getScim2MeAPI for fetching user profile data, updates to theAsgardeoClientandAsgardeoNextClientclasses, and improvements to the Next.js integration.API Enhancements:
getScim2MeAPI to fetch user profile information from the SCIM2/Meendpoint, supporting both default and custom fetchers. Includes error handling for invalid URLs, network issues, and failed responses. (packages/javascript/src/api/getScim2Me.ts, packages/javascript/src/api/getScim2Me.tsR1-R149)getScim2MeAPI to validate functionality and error handling scenarios. (packages/javascript/src/api/__tests__/getScim2Me.test.ts, packages/javascript/src/api/tests/getScim2Me.test.tsR1-R120)Configuration Updates:
signInUrlandsignUpUrlproperties in theBaseConfiginterface to allow custom URLs for sign-in and sign-up pages. (packages/javascript/src/models/config.ts, packages/javascript/src/models/config.tsR79-R93)getConfigurationmethod to theAsgardeoClientandAsgardeoNextClientclasses for retrieving the current configuration. (packages/javascript/src/models/client.ts, [1];packages/javascript/src/AsgardeoJavaScriptClient.ts, [2]Next.js Integration:
AsgardeoNextClientto ensure consistent authentication state across the application. Added initialization checks and improved error handling. (packages/nextjs/src/AsgardeoNextClient.ts, [1] [2]packages/nextjs/QUICKSTART.md, [1];packages/nextjs/README.md, [2] [3] [4]Documentation and Packaging:
package.jsonto expose new modules for middleware and server-side functionality. (packages/nextjs/package.json, packages/nextjs/package.jsonR22-R34)packages/nextjs/README.md, [1] [2]Related Issues
SignInButtonto switch betweenembedded&redirectbased sign-in flows. #76SignInButtonto switch betweenembedded&redirectbased sign-in flows. #77Related PRs
Checklist
Security checks