I am trying to get the URL that I am sending the app to here and console.log it out.
url ="https://www.WEBSITE.com/"
The URL is valid but heres where the trouble starts, I cannot get the URL to console.log out.
I can correctly log the URL link and the link will open correctly but I cannot get it to log out listenerUrl
if (url !== '') { console.log("URL: ",url) if (await InAppBrowser.isAvailable()) { Linking.getInitialURL().then((url) => { }).catch(err => console.error('An error occurred', err)); Linking.once( url, listenerUrl => { console.log(listenerUrl as string); Linking.openURL(listenerUrl as string); }, null, ); InAppBrowser.openAuth(url, 'Auth/callback', { // IOS Settings dismissButtonStyle: 'cancel', // Android Settings showTitle: false, enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: true, }) .then(response => { if (Platform.OS === 'android') { Linking.getInitialURL().then(initialUrl => { console.log(initialUrl as string); this._setTracker(initialUrl as string); }); } else if (response.type === 'success') { console.log(response.url); this._setTracker(response.url); } }) .catch(e => console.log(e)); } }} catch (err) { console.log(err);}
Here is the Error:
[AuthenticationSession] Error: The provided scheme is not valid. A scheme must not include any special characters, such as ":" or "/"