I'm working on a streaming application using Music Kit. For the login, I'm using the "authorize" method which works fine when I use an account that has an Apple Music subscription. When I use an account that does not have a subscription I get prompted to try out Apple Music:
If I click "not now" it doesn't return anything at all from what I see and it just stops my function altogether. This is the code I have setup to test this:
const appleLogin = async () => {
console.log("Apple Login Called");
const userToken = await appleMusicInstance.value.authorize();
console.log("user token", userToken);
};
When I log in using a subscription account it works fine, I get a token and I can stream full-length songs. When I click "not now" (with a non-subscription account) it just stops. Doesn't even show that my "userToken" received anything and nothing else in the function gets called.
I'd like to have the ability for members to log in with their account whether they have a subscription or not and play either full length or previews based on their subscription status.
What would be the best solution to this?