Comments (5)
Hi @paymog ,
There are many ways to login on the client side:
-
Login with URL redirect
HTTP 302
You can configure the Python Social Auth urls.
https://python-social-auth-docs.readthedocs.io/en/latest/configuration/django.html#urls-entries -
Login without leaving the page
2.1. Popup (iframe)
With some JS, you can open a popup window where the user can do the authentication and the popup can be closed when the user is redirected back to the final URL.2.2. Client-side JS SDK and GraphQL validation
Some of the services support JS based login. In this case, you can obtain theaccess_token
and send it through the MutationSocialAuth
to validate the token and save the instance into database, however with Github this is not possible.
(2.2...) I found this, the flow consists of obtaining a provisional code
on the client-side and validate it on the backend to obtain the access_token
.
I could include a Mutation that receives this code
as input and then call the backend.auth_complete()
function (Python-Social-Auth) to return the access_token
.
from django-graphql-social-auth.
Thanks for the response @mongkok! I ended up using Firebase for client side authentication and sending the access token that Firebase retrieves to the backend and it works flawlessly. Thank you again for making this package, it's super useful.
from django-graphql-social-auth.
ok @paymog !,
anyway, I have created a proof of concept for OAuth2 authentication using the provisional code
, it woks!, I will create a PR soon.
This is a the url to get the code
for Github
https://github.com/login/oauth/authorize?client_id=CLIENT-ID&response_type=code&redirect_uri=REDIRECT-URI
and this library could provide two alternatives to authenticate users, via access_token
or sending the provisional code
.
from django-graphql-social-auth.
I'm trying to integrate the socialAuth mutation with my react frontend, but it is not working.
Is there anything @mongkok @paymog or any link that you can share which might help me with integrating with my react frontend.
Thanks.
from django-graphql-social-auth.
@mongkok I'm still waiting for PR with code
support
from django-graphql-social-auth.
Related Issues (20)
- 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
- Social user creation override other user account information HOT 1
- 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.