JWT works for Apple Music API but doesn't work for MusicKit

A while ago I started developing a hobby web app aroune Apple Music, and I created a script to generate my JWT and I used it with MusicKit and with Apple Music API and everything was working perfectly fine, and now I came back and wanted to continue the project from where I left off and I tried using the same code (I literally ran the same script without changing anything, it already had the p8 file and the team ID and app key etc..) so I generated a new JWT with that script, and for the Apple Music API it's working as it should, but for the MusicKit (only tried for web) it seems to not work.
For some reason when I try to authorize the user (w/ MusicKit for web) it does open the authorization pop up window and after the user enters their Apple Music credentials and tries to login, the pop up windows says there's an error, and in the URL I can see an "error" query param with the value "ERROR_FAILED_TO_VERIFY_JWT" (but the JWT is clearly working fine with Apple Music API...)

I already opened an issue report on the feedback assistant, but I was thinking maybe someone has/had the same problem and knows how to solve it or what causes it :)

@0132 - any chance you've solved this? I'm getting the EXACT same behavior now out of the blue after 4 years of my app working perfectly...

Thank you for reaching out, @zeroedge

If you have not already, filing a ticket in the Feedback Assistant would be the best way to help us diagnose and resolve this issue for you. Please make sure to include a HAR export from the network inspector captured while reproducing the issue. Screenshots, steps to reproduce, and console logs would also be very helpful.

For more information on creating a HAR export, please see the WebKit Web Inspector Network Tab documentation.

JWT works for Apple Music API but doesn't work for MusicKit
 
 
Q