Skip to content

Commit b13323b

Browse files
committed
Remove auth config temporary workaround
1 parent 0326610 commit b13323b

File tree

6 files changed

+1
-10
lines changed

6 files changed

+1
-10
lines changed

docs/06-authentication-and-authorization.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,7 @@ To configure the authentication system to use our `PizzaAuthenticationState` ins
516516

517517
```csharp
518518
// Add auth services
519-
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
520-
{
521-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
522-
});
519+
builder.Services.AddApiAuthorization<PizzaAuthenticationState>();
523520
```
524521

525522
Now we need to add logic to persist the current order, and then reestablish the current order from the persisted state after the user has successfully logged in. To do that, update the `Authentication` component to use `RemoteAuthenticatorViewCore` instead of `RemoteAuthenticatorView`. Override `OnInitialized` to setup the order state to be persisted, and implement the `OnLogInSucceeded` callback to reestablish the order state. You'll need to add a `RepaceOrder` method to `OrderState` so that you can reestablish the saved order.
@@ -594,7 +591,6 @@ But what if we want the user to be redirected back to the home page after they l
594591
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
595592
{
596593
options.AuthenticationPaths.LogOutSucceededPath = "";
597-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
598594
});
599595
```
600596

save-points/06-authentication-and-authorization/BlazingPizza.Client/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public static async Task Main(string[] args)
2121
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
2222
{
2323
options.AuthenticationPaths.LogOutSucceededPath = "";
24-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
2524
});
2625

2726
await builder.Build().RunAsync();

save-points/07-javascript-interop/BlazingPizza.Client/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static async Task Main(string[] args)
2020
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
2121
{
2222
options.AuthenticationPaths.LogOutSucceededPath = "";
23-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
2423
});
2524

2625
await builder.Build().RunAsync();

save-points/08-templated-components/BlazingPizza.Client/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static async Task Main(string[] args)
2020
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
2121
{
2222
options.AuthenticationPaths.LogOutSucceededPath = "";
23-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
2423
});
2524

2625
await builder.Build().RunAsync();

save-points/09-progressive-web-app/BlazingPizza.Client/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static async Task Main(string[] args)
2020
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
2121
{
2222
options.AuthenticationPaths.LogOutSucceededPath = "";
23-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
2423
});
2524

2625
await builder.Build().RunAsync();

src/BlazingPizza.Client/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static async Task Main(string[] args)
2020
builder.Services.AddApiAuthorization<PizzaAuthenticationState>(options =>
2121
{
2222
options.AuthenticationPaths.LogOutSucceededPath = "";
23-
options.ProviderOptions.ConfigurationEndpoint = "_configuration/BlazingPizza.Client"; // temporary workaround
2423
});
2524

2625
await builder.Build().RunAsync();

0 commit comments

Comments
 (0)