-
Notifications
You must be signed in to change notification settings - Fork 3
Added support to set SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS #429
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
Conversation
OpenAPI ChangesShow/hide No detectable change.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #429 +/- ##
==========================================
- Coverage 76.85% 76.83% -0.02%
==========================================
Files 244 244
Lines 9975 9976 +1
Branches 1703 1703
==========================================
- Hits 7666 7665 -1
- Misses 2141 2142 +1
- Partials 168 169 +1 ☔ View full report in Codecov by Sentry. |
5c3a1f3
to
cff7c65
Compare
9054d09
to
d6233b3
Compare
Just wanted to check, but has this been tested to verify that the functionality added in #330 will still work? |
@collinpreston yeah that'll still work, that code path wasn't touched |
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.
👍 LGTM!
I had some unrelated issues testing this that I detailed in this bug report: #445
After figuring that out and correcting the API URL in mit-open-login-button
, I was able to append ?redirect_url=http://ocw.odl.local:3000/
to the login URL and everything worked great. I clicked login, followed the login process and was successfully redirected back to my local OCW page.
What are the relevant tickets?
Part of #420
Description (What does it do?)
Adds a setting for
SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS
to support allowing a redirect to OCW on login.How can this be tested?
/login
, it should forward you on to/login/ol-oidc
and when you complete login you end up at the home page./login?next=http://ocw.odl.local
, you should get redirected to/login/ol-oidc/?next=http://ocw.odl.local
and then it should ignore thenext
parameter and redirect you to the home page..env
file, setSOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS=["ocw.odl.local"]
/login?next=http://ocw.odl.local
again, you should get redirected to/login/ol-oidc/?next=http://ocw.odl.local
and then subsequentlyhttp://ocw.odl.local
(doesn't matter that this doesn't exist).