When developing a WebView based application, Is it...
# ask-a-descoper
s
When developing a WebView based application, Is it possible to use the react-sdk components without enabling the localhost / equivalent domain? Or in this case it's better to implement a custom auth provider? With using backend (local) API to prevent the CORS isues / blocking of the domain?
r
AFAIK webflow does not require you to add localhost as an approved domain, did you follow this guide? https://docs.descope.com/getting-started/web-development-platforms/webflow
s
@Reuven Zabirov My question is about WebView 2, not about webflow. WebView based applications are desktop applications that have a local backend and a frontend as a WebView. So the origin if requests made from the FE are with origin localhost
r
sorry about that, naming were so similar 🙂 so technically speaking, for local development you have to use localhost as the approved domain, this is how we verify the origin of the flow request and enforce this domain. Best practice would be to have a dev project with localhost:xxxx approved so that you can work locally, and for your prod project to have actually the right domain. are you facing any issues with this setup?
s
So this is not about local development, think electron, tauri, c# + webview ...
r
I understand, the WebView renders html,css and js - this is how you achieve the flow execution. question is - are the requests to the Descope API are being made from a localhost FE?
we can hop on a quick call to sort this out, are you available by any chance?
s
so the way this works, there's a local server that serves the webapp and exposes low level apis to acces the computer. So the webapp thinks it's running on localhost. react sdk also thinks it's on localhost. I think it's abit similar to ract native but not entirely
yes we can jump on a call
r
DM