The above code yields an error saying that a client secret or a client assertion must be provided in order to request an access token. We are merely interested in securely authenticating users, and Okta suggests (actually requires) PKCE for SPA applications.
See: Implement authorization by grant type | Okta Developer
and
Your tutorial is the closest I’ve come to getting Blazor in .NET 8 working with our Okta implementation, but it still isn’t quite working when using Okta – it works great using auth0 (as you would expect)… There just isn’t a lot out there for .NET 8 authentication with Blazor