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

Accessing state value #94

Open
SkylerB1 opened this issue Nov 8, 2023 · 0 comments
Open

Accessing state value #94

SkylerB1 opened this issue Nov 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@SkylerB1
Copy link

SkylerB1 commented Nov 8, 2023

From where i should get the access to the state i pass

const { linkedInLogin } = useLinkedIn({
clientId: clientId,
redirectUri: ${ typeof window === "object" && window.location.origin }/linkedin,
scope: scopes,
state: "linkedin_page",
onSuccess: (code) => {
console.log(code);
// getLinkedInPages(code);
},
onError: (error) => {
console.log(error);
},
});

Describe the bug

I am using two separate button to connect LinkedIn but as i am clicking on one the linkedin callback trigger in both the component onSucess function. I want to restrict the one based on the state but i cant able to get access to it.

Screenshots

Screenshot from 2023-11-08 17-53-05

@SkylerB1 SkylerB1 added the bug Something isn't working label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant