Skip to content

fix: Remove erroring endpoint "/login/<provider>/<register>" from AuthOAut…#2120

Merged
dpgaspar merged 3 commits intodpgaspar:masterfrom
dkalamar:fix/oauth-login-register-500-error
Oct 11, 2023
Merged

fix: Remove erroring endpoint "/login/<provider>/<register>" from AuthOAut…#2120
dpgaspar merged 3 commits intodpgaspar:masterfrom
dkalamar:fix/oauth-login-register-500-error

Conversation

@dkalamar
Copy link
Contributor

…hView

Description

Keyword argument register was removed from AuthOAuthView.login as part of #1707. However, the endpoint /login/<provider>/<register>/ is still exposed, resulting in a 500 error whenever it is called:

TypeError: AuthOAuthView.login() got an unexpected keyword argument 'register'

This PR fixes this error and any calls to that endpoint will properly return a 404 instead.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #2120 (6fb9cfa) into master (dcf8684) will increase coverage by 5.30%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2120      +/-   ##
==========================================
+ Coverage   73.36%   78.66%   +5.30%     
==========================================
  Files          72       72              
  Lines        8687     8686       -1     
==========================================
+ Hits         6373     6833     +460     
+ Misses       2314     1853     -461     
Flag Coverage Δ
python 78.66% <ø> (+5.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
flask_appbuilder/security/views.py 66.84% <ø> (-0.09%) ⬇️

... and 7 files with indirect coverage changes

Copy link
Owner

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Good catch

@dpgaspar dpgaspar merged commit f339882 into dpgaspar:master Oct 11, 2023
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