You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,26 @@ This package is used to get authorization code for Linked In Log in feature usin
14
14
See `demo/src/index.js` for examples.
15
15
16
16
## Table of contents
17
+
-[Changelog](#changelog)
17
18
-[Installation](#installation)
18
19
-[Overview](#overview)
19
20
-[Usage](#usage)
21
+
-[Support IE](#support-ie)
20
22
-[Demo](#demo)
21
23
-[Props](#props)
22
24
-[Contribution](#contribution)
23
25
-[Issues](#issues)
24
26
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
25
33
26
34
## Installation
27
35
```
28
-
npm i react-linkedin-login-oauth2
36
+
npm install --save react-linkedin-login-oauth2
29
37
```
30
38
31
39
## Overview
@@ -118,6 +126,21 @@ You can render your own component by provide `renderElement` as following exampl
118
126
)}
119
127
/>
120
128
```
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
+
```
121
144
122
145
## Demo
123
146
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:
147
170
| onClick | function | no ||
148
171
| children | function | no | Linked in Signin button |
149
172
| renderElement | function | no | Render prop to use a custom element, use props.onClick |
173
+
| supportIE | boolean | no | false |
174
+
| redirectPath | function | no | /linkedin |
150
175
151
176
Read more about props here [https://developer.linkedin.com/docs/oauth2](https://developer.linkedin.com/docs/oauth2)
152
177
@@ -156,6 +181,8 @@ No parameters needed
156
181
## Contribution
157
182
All helps are welcome. Please open a PR and describe what do you want to improve.
158
183
184
+
I would like to thank @Songuku95 and @YBeck for your contributions to this package.
185
+
159
186
## Issues
160
187
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.
161
188
#### Failed to minify the code from this file: ./node_modules/react-linkedin-login-oauth2/node_modules/query-string/index.js:8
0 commit comments