-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update OwinWebApp DevApp to configure the redirect_uri parameter. #2798
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using Microsoft.Owin.Security; | ||
using Microsoft.Owin.Security.Cookies; | ||
using Owin; | ||
using Microsoft.Identity.Web; | ||
using Microsoft.Identity.Web.TokenCacheProviders.InMemory; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Identity.Client; | ||
using Microsoft.Identity.Abstractions; | ||
using Microsoft.Identity.Web; | ||
using Microsoft.Identity.Web.OWIN; | ||
using System.Web.Services.Description; | ||
using Microsoft.Identity.Web.TokenCacheProviders.InMemory; | ||
using Microsoft.Owin.Security; | ||
using Microsoft.Owin.Security.Cookies; | ||
using Owin; | ||
|
||
namespace OwinWebApp | ||
{ | ||
|
@@ -21,7 +19,11 @@ public void ConfigureAuth(IAppBuilder app) | |
|
||
OwinTokenAcquirerFactory factory = TokenAcquirerFactory.GetDefaultInstance<OwinTokenAcquirerFactory>(); | ||
|
||
app.AddMicrosoftIdentityWebApp(factory); | ||
app.AddMicrosoftIdentityWebApp(factory, updateOptions: (options) => | ||
{ | ||
options.RedirectUri = "https://localhost:44386/"; | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is needed, it looked to be an app registration issue. Added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found this issue with a dSTS application, this is unrelated with the configuration of the application. This shows how to affect a specific parameter called redirect_uri. |
||
|
||
factory.Services | ||
.Configure<ConfidentialClientApplicationOptions>(options => { options.RedirectUri = "https://localhost:44386/"; }) | ||
.AddMicrosoftGraph() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In reading the PR description, something doesn't seem right. Will need to look from laptop later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just sorting using statements alphabetically