-
Notifications
You must be signed in to change notification settings - Fork 156
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: redirect to custom URL when third-party auth account is unlinked #1078
feat: redirect to custom URL when third-party auth account is unlinked #1078
Conversation
Thanks for the pull request, @ArturGaspar! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
90eac4e
to
1acae39
Compare
830c2bc
to
43efc72
Compare
06687b9
to
f4d1db5
Compare
f4d1db5
to
ba65290
Compare
Hi @openedx/vanguards! This is ready for review. |
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.
- I tested this: Followed the testing instructions and verified that on TPA unlinked state, the user is redirected to the external url set in
MFE_CONFIG
. - I read through the code
- I checked for accessibility issues
- Includes documentation
@@ -19,6 +19,7 @@ const configuration = { | |||
SEARCH_CATALOG_URL: process.env.SEARCH_CATALOG_URL || null, | |||
TOS_AND_HONOR_CODE: process.env.TOS_AND_HONOR_CODE || null, | |||
TOS_LINK: process.env.TOS_LINK || null, | |||
TPA_UNLINKED_ACCOUNT_PROVISION_URL: process.env.TPA_UNLINKED_ACCOUNT_PROVISION_URL || null, |
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.
@ArturGaspar Is the TPA_UNLINKED_ACCOUNT_PROVISION_URL
required here and in the .env
? I tested without setting the value in the .env and the change works fine as long as the MFE_CONFIG
has this information.
I guess it doesn't hurt to have a default value here, maybe we could document this better somewhere?
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.
@tecoholic, here it is necessary because someone might want to enable this feature without the MFE_CONFIG API. In .env it is not necessary (as this file defaults it to null) but it seemed appropriate to have it there for reference.
Note for core reviewers: The typical use case for this is when an organization wants to do registration of a user across multiple services or use an external service to collect extra registration data that is not available from the TPA provider. So, when the user lands without an account, the get redirected to the external service specified in the |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
d813aea
to
1fdb02e
Compare
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment failed 💥 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Hi @ArturGaspar! Just checking on this. Are the requested changes ready for review? |
@mphilbrick211 Yes, please see discussion at #1078 (comment) |
@arbrandes @openedx/2u-vanguards this is ready! |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Hey @arbrandes, do you have any updates on when you'll be able to complete a final round of review here? |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
@arbrandes is this still in progress, or can it be closed? |
Sandbox deployment successful 🚀 |
@mphilbrick211 If #1354 goes forward we can use the plugin slot to implement this functionality and will no longer need this PR. I'll close this one for now. |
Settings
Description
Allow redirecting to a custom URL when signing in via third-party auth when the account is not linked.
How Has This Been Tested?
ENABLE_MFE_CONFIG_API = True
ENABLE_COMBINED_LOGIN_REGISTRATION = True
ENABLE_THIRD_PARTY_AUTH = True
AUTHN_MICROFRONTEND_URL = 'http://localhost:1999'
MFE_CONFIG = {"TPA_UNLINKED_ACCOUNT_PROVISION_URL": "http://example.com"}
'ENABLE_THIRD_PARTY_AUTH': True
and'ENABLE_AUTHN_MICROFRONTEND': True
in FEATURES dict in LMS settings (edx-platform/lms/envs/common.py
).MFE_CONFIG_API_URL='http://localhost:18000/api/mfe_config/v1'
in frontend-app-authn (e.g. in.env.development
).The login page will briefly show before redirect but I see no way to prevent this as the request to http://localhost:18000/api/mfe_context is made asynchronously and we don't know the third-party auth context until it is made, but the login page can be rendered before that.
Merge Checklist
Post-merge Checklist