Open jonasN5 opened 3 months ago
Login with Twitch doesn't work because the callback with the authorization code is a GET request, which raises: django all auth save() prohibited to prevent data loss due to unsaved related object 'app'.
django all auth save() prohibited to prevent data loss due to unsaved related object 'app'.
I patched it like so:
class TwitchLogin(SocialLoginView): adapter_class = TwitchOAuth2Adapter # callback_url = 'http://127.0.0.1:8080/accounts/twitch/login/callback/' callback_url = 'http://localhost:8080/accounts/twitch/' client_class = OAuth2Client def get(self, request, *args, **kwargs): request.data['code'] = request.query_params['code'] return self.post(request, *args, **kwargs)
Still, GET requests should be supported.
Login with Twitch doesn't work because the callback with the authorization code is a GET request, which raises:
django all auth save() prohibited to prevent data loss due to unsaved related object 'app'.
I patched it like so:
Still, GET requests should be supported.