I was able to link account with my site with Google+ Api
,
One thing I am having problem is :
- When the user links his new account(By means of not yet signed in Google+ social network) in my created api app
- The user is directed to create a Google+ profile screen.
- When submit button is pressed, it was directed to a URL then it doesnt load anymore leaving the screen blank not knowing if the user's account was created in google+.
Question: Is there a way to add or determine in the code that if the user hasn't created an account in the google+?
The other problem is when that account is link it is logged in the browser but displaying an error saying "Failed to upgrade the authorization code"
When I debugged my code it is having an error in the flow authentication:
try: # Upgrade the authorization code into a credentials object oauth_flow = flow_from_clientsecrets(os.getcwd()+path+'client_secrets.json', scope='') oauth_flow.redirect_uri = 'postmessage' credentials = oauth_flow.step2_exchange(code)except FlowExchangeError: return 'Failed to upgrade the authorization code.'
Here is the parameters passed in my view:
<meta name="google-signin-scope" content="https://www.googleapis.com/auth/plus.login" /><meta name="google-signin-requestvisibleactions" content="http://schemas.google.com/AddActivity" /><meta name="google-signin-cookiepolicy" content="single_host_origin" />
Is the problem related to the parameters? What could be the problem?
The problem is btw related to this question. Issue with Google+ upgrade via OAuth2 and multiple sign-in
client_secrets.json
:
{ "web": { "client_id": "1314.....googleusercontent.com","client_secret": "Se8....","client_email": "1314...@developer.gserviceaccount.com","redirect_uris": [ "postmessage"],"auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://accounts.google.com/o/oauth2/token" }}
Hoping for your help. Thank you.