Skip to content

Commit

Permalink
Update LinkedIn scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Pina committed Dec 4, 2023
1 parent ea584ac commit 94ba115
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.0.2

## Features

- Update LinkedIn scopes

# 2.0.1

## Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default function LinkedInPage() {
| onSuccess | function | yes | |
| onError | function | no | |
| state | string | no | randomly generated string (recommend to keep default value) |
| scope | string | no | 'r_emailaddress' |
| scope | string | no | 'email' |
| | | | See your app scope [here](https://docs.microsoft.com/en-us/linkedin/shared/authentication/authentication?context=linkedin/context#permission-types). If there are more than one, delimited by a space |
| children | function | no | Require if using `LinkedIn` component (render props) |

Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function Home() {
console.log(code);
setCode(code);
},
scope: 'r_emailaddress',
scope: 'email',
onError: (error) => {
console.log(error);
setErrorMessage(error.errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion preview/LinkedInPageHook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function LinkedInPage() {
console.log(code);
setCode(code);
},
scope: 'r_emailaddress',
scope: 'email',
onError: (error) => {
console.log(error);
setErrorMessage(error.errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion preview/LinkedInPageRenderProps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function LinkedInPage() {
console.log(code);
setCode(code);
}}
scope="r_emailaddress r_liteprofile"
scope="email profile"
onError={(error) => {
console.log(error);
setErrorMessage(error.errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion src/useLinkedIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function useLinkedIn({
clientId,
onSuccess,
onError,
scope = 'r_emailaddress',
scope = 'email',
state = '',
closePopupMessage = 'User closed the popup',
}: useLinkedInType) {
Expand Down

0 comments on commit 94ba115

Please sign in to comment.