[bug]: gitlab oauth incomplete, def authentication_error_code()
missing
#4897
Labels
🐛bug
Something isn't working
def authentication_error_code()
missing
#4897
Is there an existing issue for this?
Current behavior
plane/apiserver/plane/authentication/adapter/oauth.py
Lines 65 to 87 in 94e6fd4
calls a method
_provider_error_code()
, which is not defined in the file, nor anywhere else in the repository.https://github.com/search?q=repo%3Amakeplane%2Fplane%20_provider_error_code()&type=code
It's part of an effort to bring OAuth-based GitLab authentication to plane.
While some of the early implementations have already been improved, as with 84236f5, others have fallen behind.
_provider_error_code()
has been part of the earliest implementation in #4692.It was reintroduced in #4828
73ea645#diff-e8db188a9821b1c82b6a9e8552288f209242e8c62133bd8b924e42db59411e63R42
73ea645#diff-e8db188a9821b1c82b6a9e8552288f209242e8c62133bd8b924e42db59411e63R42-R50
and renamed to a more canonical version of its name, that caters to it's use
22f09a6
22f09a6#diff-e8db188a9821b1c82b6a9e8552288f209242e8c62133bd8b924e42db59411e63R92
I would suggest to test the implementation and would expect it to fail whenever
get_user_token()
raises an exception. Is it possible to test for such a case, e.g. in an integration test example?Completion of this code-path seems suitable to people who find themselves in situations debugging a non-working OAuth authentication configuration of a plane instance.
Steps to reproduce
_provider_error_code()
toauthentication_error_code()
.Environment
Deploy preview
Browser
Other
Variant
Self-hosted
Version
v0.22.0-dev
The text was updated successfully, but these errors were encountered: