Skip to content

Commit 5db1a11

Browse files
Update .NET 6 known-issues.md (#7545)
* Update known-issues.md * Update release-notes/6.0/known-issues.md * Update known-issues.md
1 parent c2abe9b commit 5db1a11

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

release-notes/6.0/known-issues.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,40 @@ The first time SPA apps are run, the authority for the spa proxy might be incorr
5959

6060
When using localdb (default when creating projects in VS), the normal database apply migrations error page will not be displayed correctly due to the spa proxy. This will result in errors when going to the fetch data page. Apply the migrations via 'dotnet ef database update' to create the database.
6161

62+
### SPA template issues with Individual authentication when running in production
63+
64+
SPA apps on Azure App Service with all the following:
65+
* Individual authentication and requires login for every page.
66+
* A custom domain such as `https://MyDomain.com`:
67+
68+
Sometimes return the following error `WWW-Authenticate: Bearer error="invalid_token", error_description="The issuer 'https://MyDomain.com' is invalid"`. If the app is accessed from the Azure DNS (MyDomain.azurewebsites.net), authentication is successful. Subsequent requests to `https://MyDomain.com` succeed. Alternatively, stopping and starting the app, enables authentication to succeed. This error can occur with [`Always On`](/azure/app-service/configure-common) set to `true` or `false`.
69+
70+
To prevent this problem without having to stop and restart the app:
71+
72+
1. Add a new app setting which contains the target DNS address. For example, create `IdentityServer:IssuerUri` with value `https://MyDomain.com/`
73+
1. Add the following code to the app:
74+
```
75+
builder.Services.AddIdentityServer(options =>
76+
{
77+
if (!string.IsNullOrEmpty(settings.IdentityServer.IssuerUri))
78+
{
79+
options.IssuerUri = settings.IdentityServer.IssuerUri;
80+
}
81+
})
82+
```
83+
Alternatively, add the following code:
84+
```
85+
builder.Services.AddDefaultIdentity<ApplicationUser>(options =>
86+
{
87+
if (!string.IsNullOrEmpty(settings.IdentityServer.IssuerUri))
88+
{
89+
options.Tokens.AuthenticatorIssuer = settings.IdentityServer.IssuerUri;
90+
}
91+
})
92+
```
93+
94+
For more information, see [this GitHub issue](https://github.com/dotnet/aspnetcore/issues/42072)
95+
6296
## Windows Desktop (Windows Forms / WPF)
6397

6498
### Issues running applications with Windows Desktop 6.0.2

0 commit comments

Comments
 (0)