I am using the MVC sample code from google to connect to Google Drive.
However I want to implement my own IDataStore
so that I can keep user credentials inside my database.
With the FileStorage sample everything works fine and I get the Token and RefreshToken and more than that, it automatically refresh tokens when expired.
Implementing the IDataStore
looks easy :
public class MyDataStore : IDataStore
{
public Task ClearAsync()
{
...
}
public Task DeleteAsync<T>(string key)
{
...
}
public Task<T> GetAsync<T>(string key)
{
...
}
public Task StoreAsync<T>(string key, T value)
{
...
}
}
So in the StoreAsync
I save the credentials on my database, and on the GetAsync
I get it from the database.
But strangely when using this I receive the access_token
but no refresh_token
is returned from Google.
I've tried to search from samples using a custom IDataStore
but I can't find anything.
Any ideas?
Thanks a lot