Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSuccess is called twice #75

Open
iners-max opened this issue Aug 8, 2022 · 10 comments
Open

onSuccess is called twice #75

iners-max opened this issue Aug 8, 2022 · 10 comments

Comments

@iners-max
Copy link

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?

@raoularavel
Copy link

Same for me

@tripathiaakasah
Copy link

i am having same issue plz help

@mamankhan99
Copy link

By any chance the component hosting the hook is getting rendered twice? or can you provide some more context on the usage?

@kallsbo
Copy link

kallsbo commented Jan 14, 2023

I had the same issue in development due to <React.StrictMode>
Removed them and the issue is gone.

@pasindu1997
Copy link

@kallsbo
Thanks, This works

@ayushsanjtgs
Copy link

ayushsanjtgs commented May 23, 2023

Same issue coming for me!
Strict mode didn't solve the issue, still being called twice!

@gauravp-dev
Copy link

Removing <React.StrictMode> works but how onSuccess is getting triggered second time and there should be some solution for this

@gauravp-dev
Copy link

I am having same is there any solution to that apart from removing StrictMode

@Tobi-davies
Copy link

I am having same is there any solution to that apart from removing StrictMode

Good day @gauravp-dev , did you get a solution to this? I am currently experiencing the same issue

@MXSH-Dev
Copy link

I have the same issue, any suggestions besides removing strict mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants