You can pass a dynamic stringified JSON in the param "state" as mentioned in the docs - https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms:
The state contained in the Authorize URL.
Topic:
App & System Services
SubTopic:
General
Tags: