Flask-Middleware / flask-security

Quick and simple security for Flask applications
MIT License
624 stars 155 forks source link

Improve oauth glue #915

Closed jwag956 closed 5 months ago

jwag956 commented 5 months ago

Some providers e.g. Azure require the redirect URL to match exactly - including query params etc. To support that we now store any 'next' value in the session (fs_oauth_next).

To enable better debugging a class that can be subclassed for each provider - the auth_response_error() method can be subclassed for better debugging/UX.

Convert our Github and Google pre-defined providers to the new class method.

Add support for Azure in the Oauth example code.

Change OAUTH_HANDSHAKE_ERROR to include info from authlib.

closes #912

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (f568cae) 98.39% compared to head (4d42bae) 98.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #915 +/- ## ========================================== + Coverage 98.39% 98.40% +0.01% ========================================== Files 34 35 +1 Lines 4474 4508 +34 ========================================== + Hits 4402 4436 +34 Misses 72 72 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.