react-linkedin-login-oauth2
react-linkedin-login-oauth2 copied to clipboard
onSuccess is called twice
When I get the authorization code from the onSuccess callback, I will try to retrieve an access token from LinkedIn. However, I found that the onSuccess
callback is always called twice with the same authorization code. It will trigger my function to LinkedIn twice causing LinkedIn to return an error saying my authorization code is expired in the second call.
Is it intented?
Same for me
i am having same issue plz help
By any chance the component hosting the hook is getting rendered twice? or can you provide some more context on the usage?
I had the same issue in development due to <React.StrictMode> Removed them and the issue is gone.
@kallsbo Thanks, This works
Same issue coming for me! Strict mode didn't solve the issue, still being called twice!
Removing <React.StrictMode> works but how onSuccess is getting triggered second time and there should be some solution for this
I am having same is there any solution to that apart from removing StrictMode