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

How can we create a username insensitive check for social login #26

Open
rohit-loc opened this issue Sep 10, 2021 · 0 comments
Open

How can we create a username insensitive check for social login #26

rohit-loc opened this issue Sep 10, 2021 · 0 comments

Comments

@rohit-loc
Copy link

rohit-loc commented Sep 10, 2021

The issue is I already done a normal email registeration with a username as pawan.
Now if some other user is doing social login and his facebook or gmail username is pawan, the new user is also getting username as "Pawan", which is a case sensitive check. But i dont dont want same usernames like "Pawan", "pawan" or "paWan". It should treat all as one and create a random username out of it.
I am using:
django-graphql-auth==0.3.16
django-graphql-jwt==0.3.0
django-graphql-social-auth==0.1.4
Django==3.2.4

socialauth

`# Middleware
MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",

"django.middleware.cache.UpdateCacheMiddleware",

"django.middleware.security.SecurityMiddleware",

"django.contrib.sessions.middleware.SessionMiddleware",

"django.middleware.common.CommonMiddleware",

"django.middleware.csrf.CsrfViewMiddleware",

"django.contrib.auth.middleware.AuthenticationMiddleware",

"django.contrib.messages.middleware.MessageMiddleware",

"django.middleware.clickjacking.XFrameOptionsMiddleware",


"django.middleware.cache.FetchFromCacheMiddleware",

]`

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

No branches or pull requests

1 participant