Skip to content

Instantly share code, notes, and snippets.

@ManishPoduval
Created May 11, 2021 17:10
Show Gist options
  • Save ManishPoduval/dac5fd23cf1f322698641b6bddbaa2b3 to your computer and use it in GitHub Desktop.
Save ManishPoduval/dac5fd23cf1f322698641b6bddbaa2b3 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import { LinkedIn } from 'react-linkedin-login-oauth2';
import linkedin from 'react-linkedin-login-oauth2/assets/linkedin.png'
class LinkedInButton extends Component {
render() {
const { onSuccess, onFailure } = this.props
return (
<div>
<LinkedIn
clientId="78vnwlzh5ohmwt"
onFailure={onFailure}
onSuccess={onSuccess}
scope={'r_liteprofile r_emailaddress'}
redirectUri={`http://localhost:3000/linkedin`}
>
<img src={linkedin} alt="Log in with Linked In" style={{ maxWidth: '180px' }} />
</LinkedIn>
</div>
);
}
}
export default LinkedInButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment