-
Notifications
You must be signed in to change notification settings - Fork 50
Update Azure AD/OIDC sample #29
Update Azure AD/OIDC sample #29
Conversation
No issues were found in this pull request. |
No issues were found in this pull request. |
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.
Very nice, thank you.
I've proposed a few addition and have asked a question, otherwise this looks very good to me!
README.md
Outdated
|
||
### Step 1: Clone or download this repository | ||
1. Sign in to the [Azure portal](https://portal.azure.com). | ||
2. Navigate to the Azure Active Directory blade. |
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.
We need to explain a bit more here. people might have several tenant:
2. On the top bar, click on your account and under the Directory list, choose the Active Directory tenant where you wish to register your application
3. Click on More Services in the left hand nav, and choose Azure Active Directory.
README.md
Outdated
|
||
### Step 4: Run the sample | ||
- Add Bower to the project file: |
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.
Why do we need to do that? I did not (I did Dotnet run immediately) and that worked?
README.md
Outdated
|
||
## About The Code | ||
Make a request to the app. The app immediately attempts to authenticate you via Azure AD. Sign in with your Global Administrator account. |
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.
Why do we need to be a global admin account? that should work with any account of the tenant?
Startup.cs
Outdated
app.UseAuthentication(); | ||
|
||
app.UseMvcWithDefaultRoute(); | ||
} |
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.
when doing Dotnet new, also got the following code:
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
No issues were found in this pull request. |
Yes, I was a bit overzealous in attempting to simplify the steps. I put that back. I add a link over to the tenant topic in case the reader would like more info on tenants. Also, the list there should auto-number for us with a "1." on each list item. Makes it a little easier in the future to insert and delete items.
I was just trying to keep it simple. I added more information that includes using a user account.
Yes, they're probably going to be switching over to the UseMvcWithDefaultRoute convenience method shortly (including for the 2.0 templates) (aspnet/templating 31). I ask them there if and how fast they plan to get a PR in, which will signal that they approve of the change. Even if they only make the change for 2.1, going ahead here with the change will harden the instructions, and a new issue won't be required to update at 2.1 (that's just a suggestion, of course). It's just one less thing to have to deal with later. 😄
Ah ... yes. TL;DR here ... but there's a bit to explain on this one, so bear with me. This is most interesting (and slightly disturbing) part! lol It turns out that this sample (and many others that were produced in VS for topics) are broken when running outside of VS for Bower and The sample itself (the app) runs OOB (e.g., As u know, there's a huge ASP.NET Core xplat push (and x-tooling for that matter, e.g., VS Code and command line). I take MS at its word on this: Samples for topics that describe and use features that work xplat and x-tooling shouldn't rely upon baked-in features of VS in order to function (logically I mean 😄). To make this sample run Bower and Now having said all of that, they're removing Bower and What we could do here for now is follow their lead and strip out all of the Bower and For reference on all of that, see: |
No issues were found in this pull request. |
Now that we have their answer on the Bower/ On the I recommend leaving |
No issues were found in this pull request. |
No issues were found in this pull request. |
No issues were found in this pull request. |
No issues were found in this pull request. |
Addresses dotnet/AspNetCore.Docs#4449
@jmprieur Here it is. First draft, of course. 😄
Notes:
dotnet new mvc
template with--auth SingleOrg
. They can get the sample via the command line or by cloning/downloading the repo.Client ID
andApplication ID
Tenant ID
appearing in endpoint URLs in the portalcc/ @Rick-Anderson