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

Add support for SOCIAL_AUTH_REDIRECT_IS_HTTPS #3652

Merged
merged 4 commits into from
Mar 15, 2021

Conversation

Twixes
Copy link
Collaborator

@Twixes Twixes commented Mar 15, 2021

Changes

This simple setting should allow us to force HTTPS on social auth redirects when needed (as in some routing cases the redirects may be mistakenly HTTPS). Social auth docs.

@timgl timgl temporarily deployed to posthog-social-auth-red-aigdvp March 15, 2021 14:16 Inactive
@Twixes Twixes requested a review from paolodamico March 15, 2021 14:21
@paolodamico
Copy link
Contributor

lgtm! though, setting IS_BEHIND_PROXY properly seemed to work too, as we do set the header in there

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
, but if you want to add it to be even more deliberate, perfect. Remember to update the environment variables doc too pls!

@Twixes
Copy link
Collaborator Author

Twixes commented Mar 15, 2021

Ah yeah, this basically is for proxy situations too, so if IS_BEHIND_PROXY does the job, we don't need this setting specifically for social auth.

@Twixes Twixes closed this Mar 15, 2021
@Twixes Twixes reopened this Mar 15, 2021
@Twixes Twixes temporarily deployed to posthog-social-auth-red-cjowah March 15, 2021 20:09 Inactive
@Twixes Twixes temporarily deployed to posthog-social-auth-red-cjowah March 15, 2021 20:10 Inactive
@Twixes
Copy link
Collaborator Author

Twixes commented Mar 15, 2021

So SOCIAL_AUTH_REDIRECT_IS_HTTPS will be true by default, except in DEBUG mode.

@Twixes Twixes temporarily deployed to posthog-social-auth-red-cjowah March 15, 2021 20:14 Inactive
@fuziontech
Copy link
Member

Perfect

:shipit:

Copy link
Member

@fuziontech fuziontech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect

@fuziontech fuziontech merged commit 79fc620 into master Mar 15, 2021
@fuziontech fuziontech deleted the SOCIAL_AUTH_REDIRECT_IS_HTTPS branch March 15, 2021 23:09
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

Successfully merging this pull request may close these issues.

None yet

4 participants