CrossGeeks / GoogleClientPlugin

Google Client Plugin for Xamarin iOS and Android
https://www.pujolsluis.com/google-client-plugin-for-xamarin/
MIT License
89 stars 37 forks source link

Scope Requesting Feature #9

Closed RomaRudyak closed 6 years ago

RomaRudyak commented 6 years ago

In context of my application I need to access additional APIs of Google. I add possibility to configure additional scope on platforms.

RomaRudyak commented 6 years ago

Hi @rdelrosario and @Pujolsluis,

in this pull request I have problem with retrieving of IdToken on android. can you give hint.

as i can login and add additional scopes but still IdToken not returned

Pujolsluis commented 6 years ago

Hey @RomaRudyak ,

Great contribution!! Yes this feature overlaps with the one requested on issue #2 , @rdelrosario and me will be working this weekend on adding the AuthToken for Android since we have to look into it more, this is because it seems like it's not that straightforward as their iOS SDK.

After we add your PR for the scopes and the AuthToken we will be releasing the first stable version of the plugin to the public, we will keep you posted 💪 .

RomaRudyak commented 6 years ago

@Pujolsluis cool, I already reserched things, and few threads point to use web app token one to configure to .RequestIdToken. but It all failed for me :(

Pujolsluis commented 6 years ago

Hey @RomaRudyak we just released a version that allows you to get the user token, we added a new optional parameter, for supporting the .requestTokenId method on the builder (we are still looking into the issue because we want to get the requestServerAuthCode method to work too), send your Google Developer Console Android Client Id to that parameter and it should work.

Test it out and give us your feedback 💪

RomaRudyak commented 6 years ago

@Pujolsluis thank you fast release. But still no luck for me to receive AccessToken on Android. Here is my repo

Pujolsluis commented 6 years ago

Hey @RomaRudyak , The problem is that you have to send it as the 3rd parameter, since that's the one for the requestTokenId method. it should be like this

GoogleClientManager.Initialize(this, null, <client id>);
RomaRudyak commented 6 years ago

@Pujolsluis I crated test project and all workd. But in my existing project it not works :( I will resolve conflicts for scope adoption

RomaRudyak commented 6 years ago

I am using MvvmCross and there is some problem with MvxAppCompatActivity. I will dig in more and try find out what the problem is. For standart AppCompatActivity all works

RomaRudyak commented 6 years ago

@Pujolsluis Found out the problem in my project. Created #12 issue

Pujolsluis commented 6 years ago

Goodjob! @RomaRudyak ,

We will review your changes and issues over the weekend 💪