This package has worked fine for ~2 years on our site, but it just now started failing because it tries to access AppleID before it has downloaded the script
Error in console:

Our code:
<AppleLogin
clientId={appleClientId}
redirectURI={appleRedirectURI}
scope="name email"
usePopup={true}
callback={userInfo => this.responseAppleCallback(userInfo)}
render={renderProps => (
<button type="button" onClick={renderProps.onClick} className="provider apple">
Apple
</button>
)}
/>
This package has worked fine for ~2 years on our site, but it just now started failing because it tries to access AppleID before it has downloaded the script
Error in console:

Our code: