Skip to content

Allow passing csrf cookie args in FastApiUsers.get_oauth_router#1552

Merged
frankie567 merged 2 commits intofastapi-users:masterfrom
retoflow:fix/pass_oauth_cookie_args
Dec 19, 2025
Merged

Allow passing csrf cookie args in FastApiUsers.get_oauth_router#1552
frankie567 merged 2 commits intofastapi-users:masterfrom
retoflow:fix/pass_oauth_cookie_args

Conversation

@jthurner
Copy link
Contributor

@jthurner jthurner commented Dec 19, 2025

The oauth CSRF-cookie added in 7cf413c is configurable through router.oauth.get_oauth_router, but the arguments are not passed through from FastApiUsers.get_oauth_router which is the recommended way to create the routes.

The PR simply adds the new arguments to the get_oauth_router function on the main FastApiUsers object. Currently this means their default values are defined in two places, you might prefer to remove them from router.oauth.get_oauth_router().

@frankie567
Copy link
Member

Right, very great catch! Thank you 🙏

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1df7c10) to head (8d54d5c).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1552   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           35        35           
  Lines          991       991           
=========================================
  Hits           991       991           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frankie567 frankie567 merged commit 23784b2 into fastapi-users:master Dec 19, 2025
10 of 15 checks passed
@frankie567
Copy link
Member

@all-contributors add @jthurner for bug

@allcontributors
Copy link
Contributor

@frankie567

I've put up a pull request to add @jthurner! 🎉

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.

2 participants