I'm developing an universal windows app (Windows 10) where I have a "Two-Layered" App: On IoT-Devices (e.g. Raspberry Pi 2) it just displays content, but on all other Devices (PC, Notebook, Smartphone, etc.) you have something like an controller for the displayed data.
One of the features I want to realize is the Windows Live Login in the Controller Part to get Calendar Information in the Display-IoT-Part. For that I give users the opportunity to login with Windows Live as shown below:
LiveAuthClient auth = new LiveAuthClient();
LiveLoginResult loginResult = await auth.LoginAsync(new string[] { "wl.signin", "wl.calendars", "wl.offline_access" });
if (loginResult.Status == LiveConnectSessionStatus.Connected)
{
//Save the AccessToken from loginResult.Session.AccessToken
TokenHandler.Save(loginResult.Session.AccessToken); //AccessToken is quite accessable right here
//But as far as I know I should save the RefreshToken, but the Session has no field for it
}
So my proplem is, that I don't get a field from the LiveConnectSession where the RefreshToken could be stored, but all articles I read are telling, that I just need to add wl.offline_access to the scopes for receiving an RefreshToken.
I'm not very familiar with OAuth2.0 and SDKs / APIs are building on OAuth, so does someone knows anything, what I'm doing wrong or how I have to handle it?
I'm really thankful for all well meant and helpful answers!
PS: I'm using the Live SDK 5.6 and not the new OneDrive API, because it has no access to Calendar Information