Skip to content

Commit

Permalink
fix: sign-in issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyakunin committed Dec 15, 2023
1 parent ce7be34 commit fbec6d4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/Part11.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ var fusionClient = fusion.AddRestEaseClient();
// Configure ASP.NET Core authentication providers:
services.AddAuthentication(options => {
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
}).AddCookie(options => {
// You can use whatever you prefer to store the authentication info
// in ASP.NET Core, this specific example uses a cookie.
Expand Down
2 changes: 1 addition & 1 deletion src/Blazor/Server/Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.1" />
Expand Down
6 changes: 1 addition & 5 deletions src/Blazor/Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.StaticWebAssets;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Samples.Blazor.Abstractions;
using Samples.Blazor.Server.Services;
using Samples.Blazor.UI.Services;
using Stl.DependencyInjection;
using Stl.Fusion.Authentication;
using Stl.Fusion.Blazor;
using Stl.Fusion.Blazor.Authentication;
using Stl.Fusion.EntityFramework;
using Stl.Fusion.Server;
using Stl.IO;
Expand Down Expand Up @@ -119,7 +115,7 @@ public void ConfigureServices(IServiceCollection services)

// ASP.NET Core authentication providers
services.AddAuthentication(options => {
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
}).AddCookie(options => {
options.LoginPath = "/signIn";
options.LogoutPath = "/signOut";
Expand Down
2 changes: 1 addition & 1 deletion src/HelloBlazorHybrid/Server/Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Stl.Fusion.EntityFramework" Version="6.8.11" />
<PackageReference Include="Stl.Fusion.Server" Version="6.8.11" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion templates/TodoApp/Host/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void ConfigureServices(IServiceCollection services)

// ASP.NET Core authentication providers
services.AddAuthentication(options => {
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
}).AddCookie(options => {
options.LoginPath = "/signIn";
options.LogoutPath = "/signOut";
Expand Down

0 comments on commit fbec6d4

Please sign in to comment.