Apple MusicKit JS v1 localStorage issue

Hello!

I am attempting to intergate the Apple MusicKit v1 library via a plugin in my strapi web application.

I have this mostly working, but I am having issues with authentication. The MusicKit authentication flow is as follows:

  1. You call the authorize() method on the MusicKit object
  2. A popup window opens to allow auth with the user’s Apple credentials
  3. After successfully authenticating, a localStorage key is added with the resulting auth token from Apple as the value

I have extensively debugged this flow and have found that auth is succeeding on the Apple side and the JS library is attempting to set the localStorage key, but no key is ever set. I tested a simple HTML file to ensure that my Apple Developer token is good, etc, and have isolated this issue to Strapi.

Does anyone have any ideas? Has anyone successfully integrated with MusicKit js?

Thank you!

After testing more, I am wondering if this is related to the strapi host config? I’m pretty stumped. I’m able to get MusicKit JS working in a variety of tests, but I can’t integrate with my Strapi plugin.

Any help is appreciated!