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

fix: Google OAuth broken in unified docker image #4839

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

jiulongw
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.
  • I have used a Conventional Commit title for this Pull Request

Changes

Allows changing SECURE_CROSS_ORIGIN_OPENER_POLICY Django settings via environment variable.

This setting is set to "same-origin" by default by Django, which effectively blocks Google's OAuth popup window sending access token to Flagsmith.

How did you test this code?

  1. Deploy with the Flagsmith unified Docker image to production with https domain.
  2. Turn on Google OAuth.
  3. Google OAuth flow only works after setting the DJANGO_SECURE_CROSS_ORIGIN_OPENER_POLICY to same-origin-allow-popups in the environment variable.

@jiulongw jiulongw requested review from a team as code owners November 16, 2024 00:49
@jiulongw jiulongw requested review from matthewelwell and removed request for a team November 16, 2024 00:49
Copy link

vercel bot commented Nov 16, 2024

@jiulongw is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 4:09am

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

Thanks for this @jiulongw!

Copy link
Contributor

github-actions bot commented Nov 18, 2024

Uffizzi Preview deployment-58325 was deleted.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.35%. Comparing base (9bbfdf0) to head (16ff185).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4839   +/-   ##
=======================================
  Coverage   97.35%   97.35%           
=======================================
  Files        1182     1182           
  Lines       41272    41273    +1     
=======================================
+ Hits        40179    40180    +1     
  Misses       1093     1093           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@matthewelwell
Copy link
Contributor

@jiulongw can you fix the linting errors here and we can get this merged.

@jiulongw
Copy link
Contributor Author

@matthewelwell thanks for reviewing! Just fixed the formatting.

@matthewelwell matthewelwell merged commit 051cc6f into Flagsmith:main Nov 19, 2024
22 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API docs Documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants