greatSumini / react-facebook-login

Well-Typed React Component for Facebook Login
https://www.npmjs.com/package/@greatsumini/react-facebook-login
MIT License
104 stars 31 forks source link

auth_nonce is not working with auth_type:reauthenticate #56

Closed greatSumini closed 2 years ago

greatSumini commented 2 years ago

related: https://github.com/keppelen/react-facebook-login/issues/329

hamedazhar-giz commented 2 years ago

@greatSumini Did you get any solution?

greatSumini commented 2 years ago

released in version 3.1.0 🚀 in v3.1.0, you can solve it by using loginOptions.auth_nonce. like below!

<FacebookLogin
  appId="{APP_ID}"
  loginOptions={{
    auth_type: 'reauthentication',
    // #1. you can pass string. or,
    auth_nonce: '{ANY_UNIQUE_STRING}',
    // #2. you can pass function which returns string
    auth_nonce: () => Date.now().toString()
  }}
/>

@hamedazhar-giz thanks for interest 😄