5 |
Authentication
6 |
Sign in using one of these external providers:
7 |
8 | @foreach (var scheme in Model!.OrderBy(p => p.DisplayName))
9 | {
10 |
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/samples/Mvc.Client/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 |
2 | @if (User?.Identity?.IsAuthenticated ?? false)
3 | {
4 |
Welcome, @User.Identity.Name
5 |
6 |
7 | @foreach (var claim in Context.User.Claims)
8 | {
9 |
@claim.Type
: @claim.Value
10 | }
11 |
12 |
13 |
Sign out
14 | }
15 |
16 | else
17 | {
18 |
Welcome, anonymous
19 |
Sign in
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/samples/Mvc.Client/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/samples/Mvc.Client/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Dropbox": {
3 | "ClientId": "jpk24g2uxfxe939",
4 | "ClientSecret": "qbxvkjk5la7mjp6"
5 | },
6 | "GitHub": {
7 | "ClientId": "49e302895d8b09ea5656",
8 | "ClientSecret": "98f1bf028608901e9df91d64ee61536fe562064b"
9 | },
10 | "Google": {
11 | "ClientId": "560027070069-37ldt4kfuohhu3m495hk2j4pjp92d382.apps.googleusercontent.com",
12 | "ClientSecret": "n2Q-GEw9RQjzcRbU3qhfTj8f"
13 | },
14 | "Twitter": {
15 | "ClientId": "6XaCTaLbMqfj6ww3zvZ5g",
16 | "ClientSecret": "Il2eFzGIrYhz6BWjYhVXBPQSfZuS4xoHpSSyD9PI"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/samples/Mvc.Client/web.config:
--------------------------------------------------------------------------------
1 |
2 |