I am using google oAuth for my python application in which I have feature to automatically logging in by google into my app. When I try to login first time, it will be successfull, but from next time if I will login it doesn't success and each time I gets 500 internal server error.
When I checked error logs, I got following error message on 'credentials = oAuthFlow.step2_exchange(code)' line
Failed to retrieve access token: {
"error" : "invalid_grant"
}
I have valid clientId registered on google. Can anybody tell me why is it happening. I am using python 2.7.