Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderCloud SSO support #8

Open
digitalParkour opened this issue Apr 12, 2022 · 1 comment
Open

OrderCloud SSO support #8

digitalParkour opened this issue Apr 12, 2022 · 1 comment

Comments

@digitalParkour
Copy link

This project has been a huge help! Thank you so much.

Heads up, the current OcProvider doesn't play nice for implementing OrderCloud SSO. There is a need to provide a callback url that receives the authenticated users OC token (see AppStartUrl in https://ordercloud.io/knowledge-base/sso-via-openid-connect regarding). At first I tried handling it with a static page, like /sso?token={0}, dispatching a newly crafted "ssologin" action similar to the login thunk but only needing the already available token. Long story short, it can be really tricky getting it right due to the timing of all the activity in the OcProvider flipping the ocAuth flags and getting the default user for ocUser. The default anonymous user kept finishing last and overriding my logged in user. I ended up removing the static /sso callback to simply extend the logic in the OcProvider to look for query.token. This felt nice since it could support any page route as the callback.

Anyhow, it would be really nice to add support in this project for the SSO callback. Even stubbing in the /createUser and /syncUser endpoints would be fantastic (or perhaps in the @ordercloud/catalyst project).

BTW, really awesome to see Azure B2C SSO working through OrderCloud!

@oliverheywood451
Copy link
Contributor

oliverheywood451 commented Apr 13, 2022

@digitalParkour Thanks for creating the issue. I really like your idea of stubbing out the integration event endpoints. I will add that to @ordercloud/catalyst and to this project.

BTW, excited to hear you're using @ordercloud/catalyst. It's in a stage where we're looking for community feedback, so feel free to create an issue there for anything confusing or not-ideal. Thanks!

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

No branches or pull requests

2 participants