Skip to content

Commit 2f73187

Browse files
authored
Merge pull request #33 from nvh95/ver1.0.9
Ver1.0.9
2 parents e3e0d3b + a464c38 commit 2f73187

File tree

6 files changed

+16733
-87
lines changed

6 files changed

+16733
-87
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 1.0.9
2+
### Features
3+
- Remove prop `state`. It's generated automatically
4+
- Add `style` prop
5+
### Fixes
6+
- Remove `index.css` to fix #13, #30
7+
8+
### Chores
9+
- Remove default class `btn-linkedin`
10+
- Inline button style. (TODO: To use children as renderElement in 2.x)
11+
- Update README to use image from `react-linkedin-login-oauth2/assets/linkedin.png`
12+
13+
114
## 1.0.8
215

316
### Fixes

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
Demo: https://stupefied-goldberg-b44ee5.netlify.app/
1515

16-
This package is used to get authorization code for Linked In Log in feature using OAuth2 in a easy way, without redirecting your application to linked in authorization page. After have the authorization code, you can send it to server to continue to get information needed. For more, please see at [Authenticating with OAuth 2.0 - Linked In](https://developer.linkedin.com/docs/oauth2)
17-
See `demo/src/index.js` for examples.
16+
This package is used to get authorization code for Linked In Log in feature using OAuth2 in a easy way. After have the authorization code, you can send it to server to continue to get information needed. For more, please see at [Authenticating with OAuth 2.0 - Linked In](https://developer.linkedin.com/docs/oauth2)
17+
See [Usage](#usage) and [Demo](#demo) for instruction.
1818

1919
## Table of contents
2020
- [Changelog](#changelog)
@@ -24,7 +24,6 @@ See `demo/src/index.js` for examples.
2424
- [Support IE](#support-ie)
2525
- [Demo](#demo)
2626
- [Props](#props)
27-
- [Contribution](#contribution)
2827
- [Issues](#issues)
2928

3029
## Changelog
@@ -44,6 +43,7 @@ First, we create a button and provide required props
4443
import React, { Component } from 'react';
4544
4645
import { LinkedIn } from 'react-linkedin-login-oauth2';
46+
import linkedin from 'react-linkedin-login-oauth2/assets/linkedin.png'
4747
4848
class LinkedInPage extends Component {
4949
state = {
@@ -76,7 +76,7 @@ class LinkedInPage extends Component {
7676
onSuccess={this.handleSuccess}
7777
redirectUri="http://localhost:3000/linkedin"
7878
>
79-
<img src={require('./assets/linkedin.png')} alt="Log in with Linked In" style={{ maxWidth: '180px' }} />
79+
<img src={linkedin} alt="Log in with Linked In" style={{ maxWidth: '180px' }} />
8080
</LinkedIn>
8181
{!code && <div>No code</div>}
8282
{code && <div>Code: {code}</div>}
@@ -142,17 +142,8 @@ Earlier, this package might not work in IE11. The reason is that if popup and op
142142
```
143143

144144
## Demo
145-
You can see demo via this [https://github.com/nvh95/react-linkedin-login-oauth2/tree/master/demo/src](https://github.com/nvh95/react-linkedin-login-oauth2/tree/master/demo/src)
146-
Demo 1: [Use react-router-dom](https://github.com/nvh95/react-linkedin-login-oauth2/blob/master/demo/src/index.js)
147-
Demo 2: [Not use react-router-dom](https://github.com/nvh95/react-linkedin-login-oauth2/blob/master/demo/src/index1.js)
148-
Or run
149-
```
150-
git clone https://github.com/nvh95/react-linkedin-login-oauth2
151-
cd react-linkedin-login-oauth2
152-
npm start
153-
```
154-
Or via this link:
155-
[https://stupefied-goldberg-b44ee5.netlify.com/](https://stupefied-goldberg-b44ee5.netlify.com/)
145+
- Source code: https://github.com/nvh95/react-linkedin-login-oauth2-demo/blob/master/src/App.js
146+
- Online demo: [https://stupefied-goldberg-b44ee5.netlify.com/](https://stupefied-goldberg-b44ee5.netlify.com/)
156147
## Props
157148
`LinkedIn` component:
158149

@@ -164,27 +155,23 @@ Or via this link:
164155
| | | | See your app scope in `https://www.linkedin.com/developers/apps/${yourAppId}/auth` |
165156
| onSuccess | function | yes | |
166157
| onFailure | function | yes | |
167-
| state | string | no | fdsf78fyds7fm |
168158
| className | string | no | 'btn-linkedin' |
159+
| style | object | no | |
169160
| disabled | boolean | no | false |
170161
| onClick | function | no | |
171162
| children | function | no | Linked in Signin button |
172163
| renderElement | function | no | Render prop to use a custom element, use props.onClick |
173164
| supportIE | boolean | no | false |
174165
| redirectPath | function | no | /linkedin |
175166

176-
Read more about props here [https://developer.linkedin.com/docs/oauth2](https://developer.linkedin.com/docs/oauth2)
167+
Read more about props here [https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context#step-2-request-an-authorization-code](https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context#step-2-request-an-authorization-code)
177168

178169
`LinkedinPopUp` component:
179170
No parameters needed
180171

181-
## Contribution
182-
All helps are welcome. Please open a PR and describe what do you want to improve.
183-
184-
I would like to thank @Songuku95 and @YBeck for your contributions to this package.
185-
186172
## Issues
187173
Please create an issue at [https://github.com/nvh95/react-linkedin-login-oauth2/issues](https://github.com/nvh95/react-linkedin-login-oauth2/issues). I will spend time to help you.
174+
188175
#### Failed to minify the code from this file: ./node_modules/react-linkedin-login-oauth2/node_modules/query-string/index.js:8
189176
Please upgrade `react-linkedin-login-oauth2` to latest version following
190177
```

assets/index.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)