maximepvrt / angular-google-gapi

An AngularJS module for using all Google Apis and your Google Cloud Endpoints (Google App Engine) with OAuth. This module uses Google APIs Client Library for JavaScript, available for all GApis.
176 stars 111 forks source link

Google sing in session token not found in responses #83

Open pabloascencao opened 7 years ago

pabloascencao commented 7 years ago

I'm trying to use a google Api to log in my app but I want to do a double check in the BE. Googles documentation said that I'm able to do that if I send the encryted token id to the BE and stored it.

https://developers.google.com/identity/sign-in/web/sign-in

The main issue is that the response I get from this plugin doesn't have that token, Do you have any solution to that?

Thanks

maximepvrt commented 7 years ago

Hi, Use can use GAuth. getToken()

I prepare also an update of this library to make it compatible with the new API gapi.auth2 (#40) and the new signup btn :)

ruben-lopez commented 7 years ago

Hello maxime! I just want to know how much progress have you made on the gapi.auth2 functionality because @fernando-lopez and I have recently started to work on this too and maybe we are doing the same job :)

Best regards, Ruben.

maximepvrt commented 7 years ago

I just start :) https://github.com/maximepvrt/angular-google-gapi/projects/1

EugeneZ commented 7 years ago

Something to be aware of: The new gapi.auth2 API does not work when the "third party cookies" checkbox in Chrome is ticked, nor in Safari or Chrome's Private Browsing mode, or any other system where third party use of sessionStorage is limited. They have no plans to fix this. So if you upgrade it could actually cause more problems.

https://github.com/google/google-api-javascript-client/issues/246

fernando-lopez commented 7 years ago

@maximepvrt Have you started to modify the fork?

maximepvrt commented 7 years ago

I work about that Yesterday. I would like to finish this week :)

fernando-lopez commented 7 years ago

@maximepvrt Do you have news about this update? We have been working in the code to add a signout button and we have discovered the pull request we have sent to you was wrong. Javascript auth2 library wasn't properly loaded.

In the code we send you we were loading oauth2 library instead auth2 (the name is pretty similar but it's not the right one.)

2017-01-04_18-50-38

We are currently working with a newer version with the right library and I don't know what is the best option,

A) We share with you the code with the library auth2 even if it's not finished yet. (I would say it's 50% percent done)

B) We wait for you version which will be more professional than us :)

maximepvrt commented 7 years ago

Hi, 🚨 In your pull request you are editing the dist folder, it's not a good solution. 😋 @fernando-lopez I just published my work on the new version : https://github.com/maximepvrt/angular-google-gapi/tree/develop But, it does not work yet ... I want rewrite all of GAuth factory and delete GData factory

It's longer than expected

Example : https://maximepvrt.github.io/angular-google-gapi-example/ https://github.com/maximepvrt/angular-google-gapi-example/

fernando-lopez commented 7 years ago

Hello Maxime,

We have been also working in your library.

We have a new version working fine without the GData and using Auth 2.0 Library.

Do you want do a pull request?

maximepvrt commented 7 years ago

ohh yess !

fernando-lopez commented 7 years ago

Puffff I have been having a look to your new code and it's already rather differnt than the version we have created, it's difficult to merge :(

I do the pull request and you evalute what is the best way.

Let me know if I can help.