Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Parsing Reply Address to Microsoft Auth

$
0
0

When using this code:

[HttpGet("microsoftlogin")]public ActionResult MicrosoftLogin(){    var props = new AuthenticationProperties    {        RedirectUri = "https://localhost:7018/counter"    };    return Challenge(props, MicrosoftAccountDefaults.AuthenticationScheme);}

Everything works except that at the end, MS Auth page says that I didn't parse any reply address.

AADSTS900971: No reply address provided.

This the resulting URL, instead of /counter is parsing /signin-mircosoft:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=b4175612-d967-4e07-a4fd-e68aa92752af&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A7018%2Fsignin-microsoft [...]

This is included in my Program.cs:

builder.Services.AddAuthentication("Cookies").AddCookie(opt =>{    opt.Cookie.Name = "AuthCookie";}).AddMicrosoftAccount(opt =>{    opt.SignInScheme = "Cookies";    opt.ClientId = Configuration["Microsoft:ClientId"]!;    opt.ClientSecret = Configuration["Microsoft:ClientSecret"]!;});

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>