Skip to content

Commit 982ccba

Browse files
committed
Update README.md
1 parent e52477f commit 982ccba

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ AspNet.Security.OpenId.Providers
1313
**Adding external authentication to your application is a breeze** and just requires a few lines in your `Startup` class:
1414

1515
```csharp
16-
// Add Steam authentication support.
17-
app.UseSteamAuthentication();
18-
19-
// Add StackExchange authentication support.
20-
app.UseOpenIdAuthentication(options =>
16+
public void ConfigureServices(IServiceCollection services)
2117
{
22-
options.AuthenticationScheme = "StackExchange";
23-
options.DisplayName = "StackExchange";
24-
options.Authority = new Uri("https://openid.stackexchange.com/");
25-
options.CallbackPath = "/signin-stackexchange";
26-
});
18+
services.AddAuthentication()
19+
.UseSteam()
20+
.UseOpenId("StackExchange", "StackExchange", options =>
21+
{
22+
options.Authority = new Uri("https://openid.stackexchange.com/");
23+
options.CallbackPath = "/signin-stackexchange";
24+
});
25+
}
2726
```
2827

2928
See [https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev/samples/Mvc.Client](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers/tree/dev/samples/Mvc.Client) for a complete sample **using ASP.NET Core MVC and supporting multiple external providers**.

0 commit comments

Comments
 (0)