Closed dclayton77 closed 1 year ago
Hi @dclayton77 thank you for your issue. What does look like your oidc ? Which browser are you using? chrome?
Oidc is Duende IdentityServer, setup to use PKCE in the same way as the Duende example that you use on the demo code in the readme. This is all working fine when using localhost.
The issue in the browser only occurs when I use a DNS alias. E.g. from the hosts file:
127.0.0.1 web.myapp.local
I am using Edge as a browser but the problem is also present in Chrome and Gener8, although they are both Chromium based.
Did you create a self-signed certificate for web.myapp.local
?
You should have a single certificate for localhost
having at least the following SAN entries:
localhost
web.myapp.local
No, I wondered if it was something to do with certificates. I didn't explicitly create one for localhost but I guess that would already be present on the machine. I will investigate further and report back. Thank you for the pointer!
@dclayton77 The certificate job is to ensure the dns name you are using in the browser matches with the certificate canonical name (CN=) or one of the subject alternative names (SANs). If they do not match, the browser makes the call fail for obvious security reasons.
The default self-signed certificate generated by Visual Studio only provides localhost (which is also written in the SANs because it's a requirement). Therefore, if you didn't generate a custom self-signed certificate, there is no hope it can work.
HTH
Hi @dclayton77 , did you solve your problem, may we close the issue?
hi @raffaeler , @dclayton77 ,
You issue seem to be solved. Thank you very much for it. I close the issue, but feel free to reopen it if needed.
Issue and Steps to Reproduce
I have setup my React application using the sample code in the readme. Everything works great against my local identity server using PKCE while using the http:.//localhost:3000 domain. However, I also use a DNS alias for local development, E.g. http://web.myapp.local:3000. This is for CORS amongst other things.
When I try to view my react application on the DNS alias, I get an error in the browser that says my browser is not secure enough. See the screenshot below.
Is there some config to allow a custom DNS alias to work with the framework when running locally?
Versions
6.15.8
Screenshots
Thanks in advance for any help.