Hello I am trying to use Microsoft OAuth in order to be able to login with Outlook credentials inside a chrome extension.
I am using the javascript Library (https://msdn.microsoft.com/en-us/library/hh550844.aspx) but i am not being able to do it. I am doing the following.
WL.init({
client_id: "foo_bar",
scope: "wl.signin",
redirect_uri:"http://www.contoso.com/redirect",
response_type: "token" });
and then
WL.login()
what is happening is that I am being redirected to http://www.contoso.com/redirect but when I close the popup I get the following message
[WL]WL.login: The popup is closed without receiving consent.
I think the problem is the redirect_uri but how can I do this with a chrome extension?
I finally made it. Just follow this guide
http://blogs.msdn.com/b/onenotedev/archive/2014/07/23/how-to-authenticate-with-microsoft-account-in-a-chrome-extension.aspx
and you have the code here
https://github.com/jameslau-MSFT/MSAuthFromChromeExtSample
High-level Steps
Here are the things you need to do at a high-level:
Manifest should be something like this
A few things to point out:
Login code
Content script