Unfortunately, after that it's not as simple as updating the fetch call to fetch(spotifyLink, { redirect: 'follow' }) as it redirects to a page that tries to open the app or show a button with a link to the correct URL. (I would use a[href^=https://open.spotify.com to get this)
The mobile app returns links with another schema, e.g. https://spotify.link/Lh6MLTOo2Bb.
I tried to get this working myself but couldn't figure out how best to structure it in this kind of app.
Here's a failing test.
The regex needs updating:
Unfortunately, after that it's not as simple as updating the fetch call to
fetch(spotifyLink, { redirect: 'follow' })
as it redirects to a page that tries to open the app or show a button with a link to the correct URL. (I would usea[href^=https://open.spotify.com
to get this)