Comments (1)
Hi,
The issue i have discovered is that when i create a createsuperuser with incomplete information (firstname , lastname... missing) the social user creation just override the superuser account with his missing information.Step to follow :
create a superuser with the django command :
$ manage.py createsuperuser
- root
- [email protected]
- password
use the graphQL social auth to create your user :
mutation token_authentication { socialAuthToken(accessToken: "xxxxBiBQGGLzTUwZD", provider: "facebook") { social { id uid user { username email firstName lastName } provider extraData } token } }
Expected :
A User is created thanks to the social auth module.
So we should have 2 users in the database :
- root user (created with the createsuperuser command)
- user1 (created with the socialauthToken mutation)
Real Behavior :
The social user is not created.
The information from the social user override the missing root user information.
Root user information before user social connection :
- username = root | email = [email protected] | password = xxxx | firstname="" |lastname=""
Root user information after user social connection :
- username = root | email = [email protected] | password = xxxx | firstname="user1_firstname" |lastname="user1_lastname"
The 2 accounts are merged
To reproduce it, you can find in attachment :
- My dockerfile to have my django environment ready
- settings file
- schema file
- url file
Thank you for your help
Hi! I met the same problem. Try to delete token and other data of current user on client side before you send socialAuth mutation. It solved my problem.
from django-graphql-social-auth.
Related Issues (20)
- How to trigger authentication with React frontend? HOT 5
- How to do customization in case of using SocialAuthJWT? HOT 3
- Question: How to use an idToken rather than an accessToken? HOT 2
- allauth? Any type of integration supported / possible?
- Is there example of making query with received JWT token?
- AssertionError at /graph/
- Error in the authentication with twitter HOT 2
- Use pipeline and support partial HOT 4
- Setting a custom redirect_uri HOT 4
- Oauth requests from the backend server
- Option to set cookie HOT 2
- when I add class Arguments: the original arguments disappeared? HOT 1
- django social auth don't associate new users correctly HOT 3
- How do I get the refreshToken with this library HOT 1
- How can we create a username insensitive check for social login
- add a way to skip user verification
- limit only specific domain email addresses
- cannot import ugettext_lazy HOT 3
- Is this package supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-graphql-social-auth.