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

Integration with django-allauth (social auth) #140

Open
bittner opened this issue Oct 7, 2017 · 3 comments
Open

Integration with django-allauth (social auth) #140

bittner opened this issue Oct 7, 2017 · 3 comments

Comments

@bittner
Copy link

bittner commented Oct 7, 2017

(I'm sorry to be so blunt and ask this before trying it out myself. Forgive!)

The README says:

  • Invitation and registration functionality works out of the box for many situations and can be extended as need to fit specific requirements.

... yet it doesn't mention social authentication, such as django-allauth, explicitly.

How easy is it to integrate social authentication? Would django-allauth work (almost) out of the box?

@bennylope
Copy link
Owner

django-organizations doesn't "care" about the authorization system, so it works nicely side by side with social authentication.

The invitation component specifically is where you might need to extend this if, say, you wanted to send invitations over that social media channel rather than via email.

Where you might need to make other changes is allowing someone to register or respond to an invitation to an organization and create their user account - this is where you'll want to extend the backend https://github.com/bennylope/django-organizations/blob/dev/organizations/backends/defaults.py#L108

Provided you want to use social authentication directly in the registration and invitation process it's not quite out of the box but it should be reasonably straightforward to support.

If you have an updated backend for this a PR would be welcome to add for other people looking to integrate this themselves!

@loxllxol
Copy link

I'm using all-auth for email login/registration (more specifically django-rest-auth, which requires all-auth). I'm not using social logins. Currently, the invitations and registration is handled by django-rest-auth. Do I have to override the INVITATION_BACKEND and REGISTRATION_BACKEND settings and call it a day?

Anything else I'd need to do?

@nemesifier
Copy link
Contributor

@bittner @loxllxol you can take a look at this open source module which implements both django-organizations and django-allauth for OpenWISP 2 (a recently released open source wifi controller built with python & django).

It's really just a matter of correct setup and integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@bennylope @bittner @nemesifier @loxllxol and others