Problem using social auth in stateless webapp
See original GitHub issueI have the same problem as here, meaning, the last step of Google OAuth2 authentication is not working. After some searching, I saw that the problem comes from the validation of state
: the value in the request is checked against the value from the previous request that was saved in session. My problem, and I suppose it is the same one as @Emnalyeriar’s, is that my app is stateless, I don’t use session nor cookies so getting previous value of state
is impossible, nor is it restful. djoser main target are stateless apps, not being able to use the OAuth2 protocol (which is the standard for most providers) make social auth unusable. Any use of session should therefore be removed. What do you think ?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Stateless REST API with Social Login - java - Stack Overflow
My app basically enforces stateless REST API methodology, that is, our web app (client) connects to the Rest backend and backend does not ......
Read more >Implement stateless authentication like a pro using OAuth
It's true only for the resource owner. The client needs to authenticate itself every time it asks for an access token. Usually it...
Read more >REST API stateless authentication using social login
I am implementing a REST API for our mobile applications in which user will login using the SDKs of various social media.
Read more >Stateless Rest Api With Social Login - ADocLib
The best known solutions to authentication problems for APIs are the Token based/JWT authentication is stateless so there is no need to store...
Read more >Stateful vs. Stateless Web App Design | DreamFactory Software
In web applications, stateless apps can behave like stateful ones. By using a Representational State Transfer (REST) API, developers can augment ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If anyone’s interested I created my own social login views with requests_oauthlib:
I also have one for FB but its very similar
Damn, that’s a shame. I was hoping to switch from django-rest-auth to djoser for a complete restful local account and social solution. I’m currently trying to get django-rest-social-auth working for the social side of things but it sucks having to use multiple different libraries.