django-allauth

How to save extra fields on registration using custom user model in DRF + django-rest-auth

十年热恋 提交于 2019-12-21 02:53:11
问题 Using Django REST Framework (DRF), with django-rest-auth, I created a custom user model with one extra field. My aim is to use the django-rest-auth registration endpoint to register a new user in one request, and thus sending all the data to create a new user, including the data for the extra field. I am using AbstractUser, since it seems recommended for beginners, where more advanced developers could use AbstractBaseUser. This is also why the following SO answers looks too complicated for

how do i connect multiple social auth providers to the same django user using django-allauth?

好久不见. 提交于 2019-12-21 02:22:10
问题 can connect to facebook and twitter, but how do i connect a normal django user to both his facebook and twitter networks, so that the next time he has the option of logging in through any 1 of the 3 and i can utilise information from both the networks. can the signal :- allauth.socialaccount.signals.pre_social_login be used to check if a user is already logged in if yes connect the social account to the django account, but i cant figure out how to go about implementing this in the login view.

Connect facebook phonegap login with django allauth

我的未来我决定 提交于 2019-12-20 09:45:29
问题 I'm building up an app that should allow the user to sign up / sign in with Facebook and then he should be able to login (always via Facebook ) to the "main" website To be honest it's a bit more complicated than this. That's because I'm using django-tastypie and django-allauth in the main website to allow sign up, login, and browsing of our API Basically I want to make the mobile app user browse the tastypie API (accessible only if logged and if you're an user in the main website) and grant

Plug in django-allauth as endpoint in django-rest-framework

﹥>﹥吖頭↗ 提交于 2019-12-20 08:27:23
问题 I'm using django-allauth on my website for social logins. I also have a REST API powered by django-rest-framework that serves as the backend of a mobile app. Is there a way I can directly plug in allauth's authentication backend to the REST api so that I can validate (and register) users who use Facebook login in the mobile app? To clarify: The Facebook login part is handled by native SDKs. I need an endpoint that works like POST /user (that is, creates a new user), but takes Facebook oauth

using django-allauth

喜你入骨 提交于 2019-12-19 03:24:29
问题 i am having trouble using django-allauth. I am getting this error. NoReverseMatch at /accounts/login/ Reverse for 'facebook_channel' with arguments '()' and keyword arguments '{}' not found. So far I have followed everything to the letter. here is my settings.py INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', # Uncomment the next line to enable the admin:

Override Django allauth signup “next” redirect URL

雨燕双飞 提交于 2019-12-18 15:16:25
问题 Suppose a user is on the page /some_url/ on a site with django-allauth. When clicking "Login" they get sent to a URL like: /accounts/login/?next=/some_url/ If they are already a registered user, after logging in here, they get sent to the /some_url/ , which is fine. But if they're not registered, and they click "sign up", they get sent to: /accounts/signup/?next=/some_url/ Suppose I want to send the user to some onboarding experience, at /onboarding/ , straight after they sign up. What's the

How to edit django-allauth default templates?

梦想的初衷 提交于 2019-12-18 15:09:30
问题 i'm using Django 1.10 and i want to add the allauth's app for login, signin, etc, to my website. I've installed allauth from pip, and tried to put the templates from allauth repository inside my templates folder and call them but i don't know how to make it work. 回答1: The correct answer can be found here: https://stackoverflow.com/a/31282443/4992248 Create yourproject/templates/allauth/account/ and paste here all templates you need to edit from /myproject/Lib/site-packages/allauth/templates

Remove 'username' field from django-allauth

白昼怎懂夜的黑 提交于 2019-12-18 12:49:53
问题 When django-registration doesn't support django 1.5 and custom user model. I'm trying use django-allauth, from first look it's great product. Problem i have - username field required, but in my app i don't have username's. So, allauth documentation says: **Available settings:** ACCOUNT_AUTHENTICATION_METHOD (="username" | "email" | "username_email") Specifies the login method to use -- whether the user logs in by entering his username, e-mail address, or either one of both. Ok, i done, and

Django rest auth email instead of username

自闭症网瘾萝莉.ら 提交于 2019-12-18 02:46:31
问题 I have a django project in which I am using Django-rest-auth to do authentication. I want to use email with password to authenticate the user and not the username+password. I have following settings in my settings.py but it didn't do anything for me: REST_SESSION_LOGIN = True EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_AUTHENTICATION_METHOD = 'EMAIL' ACCOUNT_EMAIL_VERIFICATION = 'optional' How can I achieve it? 回答1: Following setting

Implementing Ajax requests / response with django-allauth

末鹿安然 提交于 2019-12-17 18:25:06
问题 I am using django-allauth for one of my project. I would like to implement login/signup process via ajax. I would like to have customized signup form. I was going through their signupmixin and signup form. Sounds like I can write custom views for each action and map it to the url config. I am not sure what is the best way to do this. Thank you so much for any help or advice on this. 回答1: It depends a bit on what you mean by ajax. If you just want to have a popup-style login/signup box on