SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

Suggestion: Add new features that support the use of aspnetcore's PathBase

Open worldofchu opened this issue 7 months ago • 8 comments

建议:增加新特性 ,支持使用aspnetcore的 PathBase 例如 https://localhost:5000/sso/master 。 Suggestion: Add new features that support the use of aspnetcore's PathBase, such as https://localhost:5000/sso/master 。

worldofchu avatar Jun 12 '25 00:06 worldofchu

"When will this be handled?"

worldofchu avatar Jul 13 '25 15:07 worldofchu

Hello, and sorry for the late reply.

Support for PathBase is provided by default in ASP.NET Core. You can enable it by editing your Program.cs file and adding the following line:

app.UsePathBase("/sso");

KR,

SID

simpleidserver avatar Jul 14 '25 11:07 simpleidserver

Because I tested version 5.X and it didn't work, so I made some modifications! Later, version 6.0 underwent significant changes, which I found a bit challenging. So, can you improve this for version 6.X @simpleidserver

worldofchu avatar Jul 15 '25 07:07 worldofchu

Since version 6.0.3, virtual paths are now supported, and you should be able to use your custom virtual path by adding the following code in Program.cs:

// Copyright (c) SimpleIdServer. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
...
var app = webApplicationBuilder.Build();
app.Services.SeedData();
var hostedServices = app.Services.GetServices<IHostedService>();
app.UsePathBase("/sso");
app.UseCors("AllowAll");
app.UseSid()
    .UseSidSwagger()
    .UseSidSwaggerUi();
app.Run();

Once you've completed the migration from version 5 to the latest version, could you please give it a try? 😊

When I run the application locally, I’m able to navigate across the different realms without any issue.

Image

KR,

SID

simpleidserver avatar Jul 15 '25 11:07 simpleidserver

thinks i will test

| | cyg | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 07/15/2025 19:00 | | To | simpleidserver/SimpleIdServer @.> | | Cc | worldofchu @.>, Author @.> | | Subject | Re: [simpleidserver/SimpleIdServer] Suggestion: Add new features that support the use of aspnetcore's PathBase (Issue #892) | simpleidserver left a comment (simpleidserver/SimpleIdServer#892)

Since version 6.0.3, virtual paths are now supported, and you should be able to use your custom virtual path by adding the following code in Program.cs:

// Copyright (c) SimpleIdServer. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. ... var app = webApplicationBuilder.Build(); app.Services.SeedData(); var hostedServices = app.Services.GetServices<IHostedService>(); app.UsePathBase("/sso"); app.UseCors("AllowAll"); app.UseSid() .UseSidSwagger() .UseSidSwaggerUi(); app.Run();

Once you've completed the migration from version 5 to the latest version, could you please give it a try? 😊

When I run the application locally, I’m able to navigate across the different realms without any issue.

image.png (view on web)

KR,

SID

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

worldofchu avatar Jul 15 '25 13:07 worldofchu

i will next month start6.x

| | cyg | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 07/15/2025 19:00 | | To | simpleidserver/SimpleIdServer @.> | | Cc | worldofchu @.>, Author @.> | | Subject | Re: [simpleidserver/SimpleIdServer] Suggestion: Add new features that support the use of aspnetcore's PathBase (Issue #892) | simpleidserver left a comment (simpleidserver/SimpleIdServer#892)

Since version 6.0.3, virtual paths are now supported, and you should be able to use your custom virtual path by adding the following code in Program.cs:

// Copyright (c) SimpleIdServer. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. ... var app = webApplicationBuilder.Build(); app.Services.SeedData(); var hostedServices = app.Services.GetServices<IHostedService>(); app.UsePathBase("/sso"); app.UseCors("AllowAll"); app.UseSid() .UseSidSwagger() .UseSidSwaggerUi(); app.Run();

Once you've completed the migration from version 5 to the latest version, could you please give it a try? 😊

When I run the application locally, I’m able to navigate across the different realms without any issue.

image.png (view on web)

KR,

SID

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

worldofchu avatar Jul 15 '25 13:07 worldofchu

in 5.x version i make alot like pathbase chinese translation and so on

| | cyg | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 07/15/2025 19:00 | | To | simpleidserver/SimpleIdServer @.> | | Cc | worldofchu @.>, Author @.> | | Subject | Re: [simpleidserver/SimpleIdServer] Suggestion: Add new features that support the use of aspnetcore's PathBase (Issue #892) | simpleidserver left a comment (simpleidserver/SimpleIdServer#892)

Since version 6.0.3, virtual paths are now supported, and you should be able to use your custom virtual path by adding the following code in Program.cs:

// Copyright (c) SimpleIdServer. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. ... var app = webApplicationBuilder.Build(); app.Services.SeedData(); var hostedServices = app.Services.GetServices<IHostedService>(); app.UsePathBase("/sso"); app.UseCors("AllowAll"); app.UseSid() .UseSidSwagger() .UseSidSwaggerUi(); app.Run();

Once you've completed the migration from version 5 to the latest version, could you please give it a try? 😊

When I run the application locally, I’m able to navigate across the different realms without any issue.

image.png (view on web)

KR,

SID

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

worldofchu avatar Jul 15 '25 13:07 worldofchu

i will have a new start 6.x in next month。 if this have improve。iwill tellyou

| | cyg | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 07/15/2025 19:00 | | To | simpleidserver/SimpleIdServer @.> | | Cc | worldofchu @.>, Author @.> | | Subject | Re: [simpleidserver/SimpleIdServer] Suggestion: Add new features that support the use of aspnetcore's PathBase (Issue #892) | simpleidserver left a comment (simpleidserver/SimpleIdServer#892)

Since version 6.0.3, virtual paths are now supported, and you should be able to use your custom virtual path by adding the following code in Program.cs:

// Copyright (c) SimpleIdServer. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. ... var app = webApplicationBuilder.Build(); app.Services.SeedData(); var hostedServices = app.Services.GetServices<IHostedService>(); app.UsePathBase("/sso"); app.UseCors("AllowAll"); app.UseSid() .UseSidSwagger() .UseSidSwaggerUi(); app.Run();

Once you've completed the migration from version 5 to the latest version, could you please give it a try? 😊

When I run the application locally, I’m able to navigate across the different realms without any issue.

image.png (view on web)

KR,

SID

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

worldofchu avatar Jul 15 '25 13:07 worldofchu