Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: OAuth adapter error codes + missing account provider migration that introduces GitLab #4998

Conversation

almereyda
Copy link
Contributor

@almereyda almereyda commented Jul 1, 2024

Rebased #4828 on current preview

Fixes _provider_error_code() by introducing the method that is being called further down in oauth.py. Used to deduplicate code in get_user_token() and get_user_response(). Also renames it to authentication_error_code(), to fit more with where it's output is being used, namely as index for AUTHENTICATION_ERROR_CODES[].

This also rediscovered a migration, which wasn't previously included in the merge of #4692 and had back then been auto-generated with running makemigrations once. This alteration seems to be missing from the current tree, why it is included here again, despite not being mentioned in #4897.

Closes #4897

@almereyda
Copy link
Contributor Author

Ready for review.

@almereyda almereyda changed the title fix: gitlab authentication fix: OAuth adapter error codes + missing account provider migration that introduces GitLab Jul 2, 2024
@pablohashescobar
Copy link
Collaborator

@almereyda, the migration has been already updated and the above migration is present on migration 0069. You can remove the migration file from the PR.

@pablohashescobar pablohashescobar changed the base branch from preview to fix-4897-migration July 2, 2024 11:19
@pablohashescobar
Copy link
Collaborator

Thanks for the contribution @almereyda.

@pablohashescobar pablohashescobar merged commit 38fc851 into makeplane:fix-4897-migration Jul 2, 2024
13 checks passed
sriramveeraghanta pushed a commit that referenced this pull request Jul 2, 2024
…#5013)

* fix: OAuth adapter error codes + missing account provider migration that introduces GitLab (#4998)

* feat(apiserver): GitLab OAuth client

* feat(admin,packages,space,web): GitLab OAuth client

* Feat(apiserver/oauth): authentication_error_code()

* chore: remove empty files introduced by rebase

* dev: delete migration

---------

Co-authored-by: jon ⚝ <jon@allmende.io>
@almereyda
Copy link
Contributor Author

Thanks for taking care of this. I remember having had searched the migrations folder for checking if it was included, but maybe it was also very late at night.

Looking forward to the release of GitLab support with v0.22!

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.

[bug]: gitlab oauth incomplete, def authentication_error_code() missing
2 participants