Closed Lemedon closed 5 years ago
Hey @Lemedon ,
To access different API services from your backend server you need to initialize the plugin the scopes you want to use, you can read more about the topic here https://developers.google.com/identity/sign-in/android/offline-access
I believe @RomaRudyak can help you out with any questions about this, he collaborated with adding support for it on the plugin to make use of it on his projects. 💪
// Initialize method signature on Android
public static void Initialize(
Activity activity,
string serverClientId = null,
string clientId = null,
Api[] apis = null,
string[] scopes = null)
// Initialize method signature on iOS
public static void Initialize(string clientId = null, params string[] scopes)
Yes, I’m passing scopes correctly but I’m not able to receive refresh token to get access token every time my user want to see his gmail or google drive data.
@RomaRudyak can you help me with this data flow?
@Lemedon Hi,
sorry for late replay.
access_token
every time on every platform . Is that possible? @Lemedon do you register plugin as singelton in IoC of MvvmCross ? If yes, on Android MvvmCross creates first viewmidel which leads to resolving all dependencies and only then creates activity where configuration of plugin happens.
For now plugin not supports lazy configuration.
Hey @Lemedon ,
Any updates on your issue?. Thanks for all the support @RomaRudyak💪
Will proceed to close this issue, since there are no further updates.
Thanks again @RomaRudyak for your support🙌.
Describe the bug Hi! , I am not able to receive the access and refresh tokens with this library. I wanted to exchange the
ActiveToken
to access and refresh token directly from my app by calling this endpoint https://developers.google.com/identity/protocols/OAuth2WebServer#exchange-authorization-code but I only receiveaccess_token
with expires after 1 hour and withoutrefresh_token
. How can I access Google services like Gmail or Drive by using this library? Maybe I’m missing some authentication flow? Thanks for help :/