I have a .NET website that allows viewing files located in SharePoint Online, among other clouds. So far we used asked the users for the SharePoint site address, the username and the password in order to do the authentication and then made REST calls to SharePoint API, together with sending the FedAuth cookie.
Recently, we decided to use the standard Office 365 login. To accomplish this, I composed an URL like
https://login.microsoftonline.com/login.srf?wa=wsignin1%2E0&rpsnv=3&ct=1402399134&rver=6%2E1%2E6206%2E0&wp=MBI&wreply=https%3A%2F%2Fwww10226%2Esharepoint%2Ecom%2F_layouts%2F15%2Flanding%2Easpx%3FSource%3Dhttp%3A%2F%2Flocalhost%3A1676%2FtViews.aspx
The login appears and after entering the SharePoint credentials, the page is redirected to my site, but I cannot authenticate the following API calls, not having the FedAuth cookie.
Can anybody please help me with an answer or point me in the right direction? Am I thinking about it wrong? I just want this flow to work (having users login via standard window and be able to access resources without my website knowing their SharePoint online password).
Thank you in advance.