office 365 - Everytime LogOuts after application terminated RRS feed

  • Question

  • Hi,

    I am developing application using O365 REST API for mail, It always logouts on iOS device but working perfectly on simulator. Is there any solution to keep user signed in for valid time provided by API? I have referred Session management link for O365 API and it is saying timeout of 1hour but it should automatically refresh if we are connected to internet here is the link which I have referred

    • Edited by Taral Rathod Monday, August 1, 2016 7:49 AM Added Link for article
    Monday, August 1, 2016 7:42 AM

All replies

  • You could use Oauth 2 for authentication. You could generate a token when user logged in ,save this token on your mobile client. For every request, you need to attach a valid token in request header and check it at server side.If the access token has expired, the client will issue the refresh token to get a new access token. You could refer to below link for code sample : 

    Tuesday, August 2, 2016 5:25 AM
  • Hi, 

    I am following the same flow but it logouts every time even in O365-iOS-Connect same problem is there for device. Is there any security reasons  for device? Because it works fine with simulator.

    Tuesday, August 2, 2016 5:55 AM