Skip to content

Commit 765baa9

Browse files
committed
Update README for 1.0.7
1 parent b347681 commit 765baa9

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,26 @@ This package is used to get authorization code for Linked In Log in feature usin
1414
See `demo/src/index.js` for examples.
1515

1616
## Table of contents
17+
- [Changelog](#changelog)
1718
- [Installation](#installation)
1819
- [Overview](#overview)
1920
- [Usage](#usage)
21+
- [Support IE](#support-ie)
2022
- [Demo](#demo)
2123
- [Props](#props)
2224
- [Contribution](#contribution)
2325
- [Issues](#issues)
2426

27+
## Changelog
28+
### 1.0.7
29+
- Remove unnecessary `console.log`
30+
- Be able to render custom element (Thank @YBeck for your contribution)
31+
- Support IE11, please see #support-ie for more detail
32+
- Check `state` to avoid CSRF attack
2533

2634
## Installation
2735
```
28-
npm i react-linkedin-login-oauth2
36+
npm install --save react-linkedin-login-oauth2
2937
```
3038

3139
## Overview
@@ -118,6 +126,21 @@ You can render your own component by provide `renderElement` as following exampl
118126
)}
119127
/>
120128
```
129+
# Support IE
130+
131+
Earlier, this package might not work in IE11. The reason is that if popup and opener do not have same domain, popup cannot send message to opener. For more information about this, please visit [here](https://stackoverflow.com/questions/21070553/postmessage-still-broken-on-ie11). From `1.0.7`, we can bypass this by open a popup to our page, then redirect to Linked In authorization page, it should work fine. IE11 is supported in `1.0.7`. Following is step to support it. (If you don't have need to support IE, please ignore this part)
132+
133+
134+
1. Pass prop `supportIE`
135+
2. Pass `redirectPath` which has path route to `LinkedinPopUp` component, default value is `/linkedin` (for above example, `<Route exact path="/linkedin" component={LinkedInPopUp} />` => `redirectPath="/linkedin"`)
136+
```
137+
<LinkedIn
138+
...
139+
supportIE
140+
redirectPath="/linkedin"
141+
...
142+
/>
143+
```
121144

122145
## Demo
123146
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)
@@ -147,6 +170,8 @@ Or via this link:
147170
| onClick | function | no | |
148171
| children | function | no | Linked in Signin button |
149172
| renderElement | function | no | Render prop to use a custom element, use props.onClick |
173+
| supportIE | boolean | no | false |
174+
| redirectPath | function | no | /linkedin |
150175

151176
Read more about props here [https://developer.linkedin.com/docs/oauth2](https://developer.linkedin.com/docs/oauth2)
152177

@@ -156,6 +181,8 @@ No parameters needed
156181
## Contribution
157182
All helps are welcome. Please open a PR and describe what do you want to improve.
158183

184+
I would like to thank @Songuku95 and @YBeck for your contributions to this package.
185+
159186
## Issues
160187
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.
161188
#### Failed to minify the code from this file: ./node_modules/react-linkedin-login-oauth2/node_modules/query-string/index.js:8

0 commit comments

Comments
 (0)