I want to Call graph API to get OneDrive Data. I am able to obtain JWT which looks like this // The conte
nts of the JSON look like this:
// {
// "token_type":"Bearer",
// "scope": "Directory.Read.All Files.ReadWrite Group.ReadWrite.All Mail.ReadWrite Mail.Send User.ReadBasic.All",
// "expires_in":"3599",
// "ext_expires_in": "0",
// "expires_on":"1426551729",
// "not_before":"1426547829",
// "resource":"https://graph.microsoft.com/",
// "access_token":"eyJ0eXAiOiJKV1QiLCJhb...",
// "refresh_token":"AAABAAAAvPM1KaPlrEqd...",
// "id_token":"eyJ0eXAiOiJKV1QiLCJhbGci..."
// }
What are the correct steps to refresh the token, store in cookies and access them to call API. I went through a lot of documentation available still unsure what is the the right flow and way of doing it.
Please guide me to the correct way of doing it.