Django-allauth - calling callback directly (from third-party app) returns error
EDIT:
I just realized that it looks for the state param in OAuth2CallbackView:
if self.adapter.supports_state:
login.state = SocialLogin.verify_and_unstash_state(
request, get_request_param(request, "state")
)
else:
login.state = SocialLogin.unstash_state(request)
ENDEDIT
Which then realizes that no state has been passed as a query param and then it returns an error.
Some third-party applications like Hubspot or Pipedrive have their own marketplace. They list my app there and there is a button "install" which generates a code parameter and redirects to https://mywebsite.com/accounts/<provider>/login/callback/?code=<SOME_CODE_THAT_THEY_GENERATED>
The problem is that allauth shows errors in such cases instead of signing up or logging in users automatically.
Social Network Login Failure
When I try to sign up the common way, eg. by going to: /accounts/<provider>/login/ - everything is working correctly and the user is signed up or logged in.
Do you know if that should work and where is the problem?