I'm apps flow goes like this:
- Launch App
- Spotify 'Allow App Access' page is opened in the browser (Chrome),
- The user give the app permission and is redirect to https://appurl.com/spotify-callback/,
- That URL is deep-linked so that my app is now opened again,
- The deep-link plugin should now match
/spotify-callback/and open the page named SpotifyCallbackPage should be opened but I get the errorconsole.error: Got a deeplink that didn't match
My deep-link code looks like:
deeplinks.route({
'/spotify-callback/': SpotifyCallbackPage
}).subscribe((match) => {
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
console.log('Successfully matched route', match);
}, (nomatch) => {
// nomatch.$link - the full link data
console.error('Got a deeplink that didn\'t match');
console.log(nomatch);
});
The URL sent to the router is:
https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600
The full error message is:
error opening ws message: {"category":"console","type":"log","data":["On deep
link",{"url":"https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600","path":"/spotify-callback/","scheme":"https","host":"appurl.com","fragment":"access_token=random-access-token-here&token_type=Bearer&expires_in=3600","extra":{"org.chromium.chrome.browser.eenp":["io.ionic.starter"],"org.chromium.chrome.browser.referrer_id":21,"com.android.browser.application_id":"com.android.chrome"}}]}
[16:28:02] console.error: Got a deeplink that didn't match
I've tried different URLs and endpoints in the router but none of them will match. Does anybody know what I should be trying to match?