-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: Add flag to enable only IDP routes #4903
Conversation
1878195
to
e4762ac
Compare
}, | ||
description: "Not Found Page", | ||
workflow: "hydraOauthLogin", | ||
template: "notFound" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDP's Not Found route definition. Here it's using the existing/default template. It can be updated to use a custom template as needed
@@ -7,6 +7,6 @@ Hooks.Events.add("afterCoreInit", () => { | |||
Reaction.addRolesToGroups({ | |||
allShops: true, | |||
groups: ["guest", "customer"], | |||
roles: ["account/login"] | |||
roles: ["account/login", "not-found"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the IDP defines the Not Found registry route, it needs to grant the access to it.
const query = { shopId: myShopId }; | ||
|
||
// This is to ensure only needed Identity-provider-related routes are published | ||
// The env can be one of three: "all", "idp-only", "exclude-idp". Default behavior is "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ticean I added you for comments about the ENV values. Is the naming good, unambiguous etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Failing test is being addressed in this ticket #4909
@impactmass approved on my end. You're free to merge whenever you get the 👍 from @ticean. |
const query = { shopId: myShopId }; | ||
|
||
// This is to ensure only needed Identity-provider-related routes are published | ||
// The env can be one of three: "all", "idp-only", "exclude-idp". Default behavior is "all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Resolves #4852
Impact:
Type: feature
Issue
See #4852
Goals for this PR:
Solution Overview
IDENTITY_PROVIDER_MODE
that is used to filter published routesDetails
all
)idp-only
)exclude-idp
)Breaking changes
None
Testing
Note: Make sure to remove existing
reaction
container after changing env value (e.g withdocker-compose down
and then up again).Set IDENTITY_PROVIDER_MODE=all in your ENV.
Once app is started, we want to confirm that all routes are available. Home page should load the products and
/account/login
should show login form.Set IDENTITY_PROVIDER_MODE=idp-only in your ENV.
Once app is started, we want to confirm that only IDP routes show. Viewing
/account/login
should show login form. Other usual pages (including home page) show Not Found.Set IDENTITY_PROVIDER_MODE=exclude-idp in your ENV.
Once app is started, we want to confirm that IDP routes do not show. Viewing
/account/login
should not show up. Other usual pages (including home page) should show.