Giter Site home page Giter Site logo

Comments (6)

AbhilashThomas avatar AbhilashThomas commented on May 12, 2024

But you are getting oauthToken....doesn't that work?

from cordova-plugin-googleplus.

vineet-pandit avatar vineet-pandit commented on May 12, 2024

I figured it out. Using the webApiKey works. I wanted to use server side authentication.

from cordova-plugin-googleplus.

AbhilashThomas avatar AbhilashThomas commented on May 12, 2024

But if I pass webApiKey as an option, I get IdToken. From this how can i use it in the server to post or do other google plus activities?

I went through the google docs and modified the plugin so as I can get the code which I can exchange for an server access token. Had to update the googleplay jar and add an interface.

from cordova-plugin-googleplus.

vineet-pandit avatar vineet-pandit commented on May 12, 2024

In the google developer dashboards I have two apps. One which was created with the package name. This was the reason I was getting the oauthToken directly.
The second app on the dashboard was a web app. This app has a web client id and a web secret. I used the web Client ID as the webApiKey in my app, this got me the idToken. On the server side I used the idToken with the web secret to retrieve the user's information.
I only wanted the user's information but on the server side. I didn't want to trust the user's email address and other information sent from the client to the server.
Using the idToken I get the information directly from google.

from cordova-plugin-googleplus.

AdamNowaczyk avatar AdamNowaczyk commented on May 12, 2024

HI @vineet-pandit, what value do you use for webApiKey option? I'm unable to get the idToken. I'm using Android client_id and I'm getting oauthToken without problems, but no idToken. When adding webApiKey error: "failed to retrieve token: Unknown".

from cordova-plugin-googleplus.

jorgeluis11 avatar jorgeluis11 commented on May 12, 2024

+1

from cordova-plugin-googleplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.