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

Response Mode passed as Web message

Open chandra-prakash-soni opened this issue 4 years ago • 4 comments

I have passed responseMode={'form_post'} but in redirect url i saw response_mode pass as web message.

chandra-prakash-soni avatar Apr 26 '21 09:04 chandra-prakash-soni

i am facing an issue to get response in react js while intergating apple login with this pkg Front end Code is <AppleLogin clientId={'xyz'} redirectURI={"xyz"} responseType={'code'} responseMode={'query'} callback={(response) => console.log('jkjkjkjkjjkjk', response)}

          usePopup={false}
          scope=" email name"
          render={(renderProps) => (
            <FaApple
              color="black"
              className="image cursor"
              onClick={renderProps.onClick}
            />
          )}
        /> 

how we can get response and send it to node js backend for furture implementation

abdulqayyum686 avatar Jun 17 '21 12:06 abdulqayyum686

Facing the same issue with web_message instead of form_post parameter value. Any fixes?

top4ek avatar Aug 10 '21 09:08 top4ek

Facing the same issue with web_message instead of form_post parameter value. Any fixes?

Yes,

<AppleLogin clientId={SOCIAL_KEY.APPLE} redirectURI={SOCIAL_KEY.APPLE_REDIRECT_URI} scope={"email name"} responseType={"code"} responseMode="form_post" usePopup={true} buttonExtraChildren={"logo"} designProp={{ height: 40, width: 130, color: "white", title: "Sign up with Apple", border_radius: 15, scale: 1, }} render={(props) => ( <button className="or-sign-btn" {...props}> <img src={image.apple} /> <span className="apple-txt">Apple</span> </button> )} callback={(data, err) => { if (data) { console.log(data); } else { console.log(err); } }} />

also you need to add

axios .post(SOCIAL_KEY.APPLE_REDIRECT_URI) .then((response) => console.log(response));

into componentDidMount method. it will works

chandraprakash0104 avatar Aug 10 '21 09:08 chandraprakash0104

In this axios call you are passing clientId and redirectUri? If yes how can we sen them with the dot operator?

Naveenhubino avatar Nov 25 '21 08:11 Naveenhubino