Closed igorgaming closed 3 months ago
The update primarily enhances the resilience and flexibility in fetching additional data within the authentication backend. By refining the method to retrieve data, it introduces a more robust approach to handle potential variations in the data source, ensuring that the necessary information is accessible even with different fallback mechanisms.
Files | Change Summary |
---|---|
.../backends/base.py |
Modified extra_data to use nested get for data retrieval with fallbacks from response , details , and alias . |
πβ¨
In the code's woven burrow, deep,
A change was made, not just to keep.
With nested gets, so sleek, so fine,
We fetch the data, line by line.
Throughresponse
anddetails
, we hop,
Not missing a beat, nor a drop.
ππΎ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.77%. Comparing base (
dbc880c
) to head (fa1cf67
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Merged, thanks for your contribution!
Proposed changes
Currently, there is a bug in getting extra_data from OAuth providers. For example, if a field from the OAuth API in the
extra_data
method returns integers (such as 1 or 0), then this will not work correctly and save an incorrect value (in my casenull
instead of0
):So this can be fixed like that
{'test': 0}.get('test', 'other expression')
Types of changes
Please check the type of change your PR introduces:
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Summary by CodeRabbit