Replies: 1 comment 3 replies
-
Your app should never navigate out to an external site, specially if you don’t own it. That’s why it’s not intended to be used in production, but you can use it in production if you want. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://capacitorjs.com/docs/config shows that the allowNavigation server configuration can be set in capacitor.config.json:
server?: {
...
...
/**
* Set additional URLs the Web View can navigate to.
*
* By default, all external URLs are opened in the external browser (not
* the Web View).
*
* This is not intended for use in production.
*
* @SInCE 1.0.0
* @default []
*/
allowNavigation?: string[];
};
The comment above says that this configuration is not intended for use in production. Is there a configuration that can be used in production?
Our app uses a oAuth 2.0 authorization code flow with PKCE to authenticate the app's user. When invoked from the app, the WKWebView in iOS will attempt to redirect the view to the auth provider's login UI but this is handled by Capacitor by launching an external browser. This breaks the user experience so we want to configure Capacitor to handle the redirect within the app.
Any recommended solution to this problem is appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions