I am trying to implement Okta Sign In widget on a Visualforce Page which is rendered in Force.com site page. With the following code it doesn’t show the sign in widget(no user name & password fields) and it is displaying as empty page. What am I doing wrong here?
If {ID} is a template literal, make sure the syntax is right, as I can see that it is added inside the double quotes which would be considered as a String.
If there is any errors in the browser developer tools, please provide us with more details of the same along with the screenshot.
This is the error that I see in the browser console.
Access to fetch at ‘https://xxx.oktapreview.com/oauth2/default/v1/interact’ from origin ‘https://xxx--dev2.sandbox.my.salesforce-sites.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
This is the error I see in the browser console.
Access to fetch at ‘https://xxx.oktapreview.com/oauth2/default/v1/interact’ from origin ‘https://xxx--dev2.sandbox.my.salesforce-sites.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.