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

add support for gitlab auth #2

Closed
glensc opened this issue Dec 13, 2016 · 3 comments
Closed

add support for gitlab auth #2

glensc opened this issue Dec 13, 2016 · 3 comments
Labels

Comments

@glensc
Copy link
Contributor

glensc commented Dec 13, 2016

copied from omab/python-social-auth#1011

should support https://gitlab.com/ and on premises installation (custom urls)

i tried to make own using this blog:
http://widerin.net/blog/weblate-gitlab-oauth-login/

in weblate, but got some errors:

weblate_1   | ERROR Internal Server Error: /accounts/complete/GitLab/
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 39, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
weblate_1   |     response = self._get_response(request)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
weblate_1   |     response = self.process_exception_by_middleware(e, request)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
weblate_1   |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
weblate_1   |     response = view_func(request, *args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
weblate_1   |     return view_func(*args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
weblate_1   |     return func(request, backend, *args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 28, in complete
weblate_1   |     redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/actions.py", line 44, in do_complete
weblate_1   |     user = backend.complete(user=user, *args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/backends/base.py", line 41, in complete
weblate_1   |     return self.auth_complete(*args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/utils.py", line 246, in wrapper
weblate_1   |     return func(*args, **kwargs)
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/backends/oauth.py", line 385, in auth_complete
weblate_1   |     state = self.validate_state()
weblate_1   |   File "/app/local/lib/python2.7/site-packages/social/backends/oauth.py", line 88, in validate_state
weblate_1   |     raise AuthStateMissing(self, 'state')
weblate_1   | AuthStateMissing: Session value state missing.

so yeah, maybe some one more familiar with psa can add it to be included in distribution and be documented

@omab omab added the feature label Dec 24, 2016
@omab
Copy link
Contributor

omab commented Dec 28, 2016

Backend added gitlab.py, documentation here.

@saily
Copy link

saily commented Jul 16, 2017

@glensc, @omab thanks for using my GitLab OAuth2 plugin.
Unfortunately i had no clue somebody was trying to integrate it into python-social-auth.
Of course i would have been happy to help!

@omab
Copy link
Contributor

omab commented Jul 16, 2017

@saily your post was for sure a great reference when I included Gitlab support, I'm sorry I didn't put the corresponding credits, that's amended now. Thanks.

omab pushed a commit that referenced this issue Mar 15, 2020
Optionally ignore protected user fields: update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants