Check this out: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js
Oh wait that requires a developer account I guess