![]() I want to redirect the user to the same Frontend Module which initiated the request. This error actually makes sense, because session is a shared. It give me error that session state has been changed. He enter the creds and hit the login button. Jhon left that screen as it is and moves back to the first tab where he has Frontend Module 1 session screen loaded up. Same flow happen as above and Jhon lands on login screen. Now Jhon opens another tab in the same browser and enter the URL of "Frontend Module 2". Jhon sees the login screen and left it as it is. There user will be presented with Login Screen. Frontend module check the localStorage for the token, it do not find it there, then Frontend module redirect the user to API server route.ĪPI server has the clientSecret and clientId which redirect the request to SSO server. Jhon hit the "Frontend Module 1" URL in the browser. The scenario is, assume there is user JHON who is not logged in yet and do not have session. it never ask for login creds and sign the user in to the system. Similarly when user loads the FrontendModule-2 same flow happend but this time because Session is being created by SSO server when FrontendModule-1 flow ran. In that frontend route I extract the token from queryParams and set in the localstorage. On the frontEnd(React APP) there is a route just for this. API server gets the profile in the session and query and sign its own token and send that to frontend module through query params. ![]() Once credientials are validated, SSO server calls the API server Endpoint with user profile and access_token. User enters the creds there, SSO server validate the credientials, creates a session. API server set the url of Frontend module in the cookie(so that i can redirect the user back to initiator frontend module) and then redirect the request to SSO server where user is presented with login screen. ĪPI server has the clientId and Secrets for the SSO server. If it do not find the token, it redirect the user to API server endpoint let say. The flow of authentication is FrontEnd Module check for token in the localstorage. I have different frontend application modules which are running on different domain and they all utlize a single API server. You can find the code for the sample app here.I have been trying to implement Single SignOn(SSO). Check out FilledStack for further information on the various features that make up the Stacked Architecture. This article has explained some of the concepts and components of Stacked Architecture, and with it, we have created a sample app that uses these components. Stacked Architecture is a super pack ready to be discharged and used to build clean, scalable applications on the fly. For further information, check out the package on pub.dev and also the articles on FilledStacks. These services can be set up and customized to fit various use cases, and similar to the NavigationService, they can be registered and used within the app on the fly. ![]() Stacked offers several services which can be set up and used within the app. Save the files and run the app you would see the button there, click the button and see the seamless transition that we achieve using the NavigationService Stacked provides. The first thing is to create a new Flutter project,Įnter fullscreen mode Exit fullscreen mode It provides widgets and constructors which control how the state is being passed and managed in the application. Handling State in Flutter application using Stacked couldn’t be much better. All of these are offered by the Stacked Architecture.
0 Comments
Leave a Reply. |