apple-music-token-generator icon indicating copy to clipboard operation
apple-music-token-generator copied to clipboard

Token expires after some time

Open abdo400 opened this issue 2 years ago • 2 comments

Is there a way to generate a token that lasts forever? No need to regenrate one every once in a while? We are using this in a front end app.

abdo400 avatar Apr 24 '22 14:04 abdo400

Pretty sure that's how the access token works. Access tokens are short lived, and refresh tokens last longer.

https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens

oogunjob avatar Jan 08 '23 03:01 oogunjob

The node version of this script sets the token's expiration to 180 days from now (code).

I made a PR to update this behavior to 180 days here: https://github.com/pelauimagineering/apple-music-token-generator/pull/24 . I just tested locally and it seems to work

Liampronan avatar Jan 17 '23 21:01 Liampronan