react-apple-login icon indicating copy to clipboard operation
react-apple-login copied to clipboard

usePopup produce `ReferenceError: AppleID is not defined` error once the component is rendered

Open Essam-Harrous opened this issue 1 year ago • 2 comments

I tried the component without the usePopup and it worked perfectly, but once I add this prop I got this bug ReferenceError: AppleID is not defined when the component was rendered.

using NextJs v12.1 the latest library version

Screenshot 2023-05-30 at 2 46 38 PM

any help with that?

Essam-Harrous avatar May 30 '23 12:05 Essam-Harrous

I had the same problem and not using popUp={true} is working. Here my code: <AppleLogin clientId="my_client_id" redirectURI="my_redirect_uri" // If i dont use usePopup the appleLogin works usePopup={true} callback={() => { console.log("callback"); }} // Capture response responseMode="query" render={(( renderProps, //Apple's custom login button ) => ( <AppleButton text="Sign in with Apple" loading={loading} onClick={renderProps.onClick} /> )} />

Sashaejarque avatar Jul 07 '23 17:07 Sashaejarque

I needed to force load script with:

efernandes-tech avatar Jul 07 '23 18:07 efernandes-tech