-
Notifications
You must be signed in to change notification settings - Fork 48
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
Closing the pop-up Issue on redirection it remain open #20
Comments
@abdulmajidashraf92 Have you resolved your problem yet? Please note that you need to handle the pop up like one of those demo: |
I also had the same problem. And why onSuccess not return something |
Same problem here. @aLx450 did you manage to solve in some way? <LinkedIn
clientId="XXXXXXXXXXXXXXXX"
onFailure={linkedinCallback}
onSuccess={linkedinCallback}
scope='r_emailaddress,r_liteprofile'
redirectUri= "http://localhost:3000"
renderElement={renderProps => (
<button href="#" style={styles.linkedinButton} onClick={renderProps.onClick}>
<FaLinkedinIn style={styles.nextIcon} size={24} />
</button>
)}
/> |
This still an issue |
@ijro @aLx450 @trungnguyen269 @nvh95 @abdulmajidashraf92 |
In order to make it work, you need to create a route import React from 'react';
import { LinkedInCallback } from 'react-linkedin-login-oauth2';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
function Demo() {
return (
<BrowserRouter>
// Your `linkedin` callback route
<Route exact path="/linkedin" component={LinkedInCallback} />
// Other routes
...
</BrowserRouter>
);
} Please refer to Usage to see how to integrate |
for me |
For those still interested, I got it to work by re-implementing the Callback. I'm not sure if there was some changes in v2 or something but I am using react-router-dom v6 with createBrowserRouter and this worked for me:
|
I'm redirecting but after redirection its remain open how can make it close
<LinkedIn
clientId="1234"
onFailure={this.handleFailure.bind(this)}
onSuccess={this.handleSuccess.bind(this)}
redirectUri="http://localhost:3000/"
scope="w_member_social"
renderElement={({onClick, disabled}) => (
Sign in with
Linkedin
)}>
The text was updated successfully, but these errors were encountered: