External Authentication with ASP.NET Web API 2 - Microsoft not working now -


i configured external authentication services within asp.net web api 2 facebook, google, microsoft & twitter year ago. revisiting able working again besides microsoft. followed tutorial similar this one.

the first error getting below -

/api/account/externallogin?provider=microsoft&response_type=token&redirect_uri=https%3a%2f%2fwww.censored.com%2fapi%2faccount%2fauthcomplete&state=pgist-wofc7hsvc990rm5rxvdkw_ozdky3pdpdeyeau1&client_id=censored&error=access_denied http/1.1" 302 0 "https://login.live.com/oauth20_authorize.srf?client_id=0000000

i deleted app @ https://apps.dev.microsoft.com thinking re-adding may fix problem discover unable re-add in such way generate clientid & client secret. has microsoft support oauth changed , have now?

here part of startup class shows how configuring facebook & microsoft oauth.

public partial class startup {     public static oauthauthorizationserveroptions oauthoptions { g      // more information on configuring authentication, please      public void configureauth(iappbuilder app)     {         // working          var fbook = new facebookauthenticationoptions         {             appid = "sadfsda",             appsecret = "dsfsadf"         };         app.usefacebookauthentication(fbook);          // not working         var msoft = new microsoftaccountauthenticationoptions         {             clientid = "sadf",             clientsecret = "zdfsdf",         };         app.usemicrosoftaccountauthentication(msoft); 

i able fix after reading of comments github link. created new app @ https://apps.dev.microsoft.com skipping guided setup. retrieved password generate new password button. , application id (a guid) used clientid , clientsecret. added redirect url e.g.

https://www.sadfsdaf.com/signin-microsoft  

and worked.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -