Skip to content

Commit

Permalink
chore: update security readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziping Liu committed May 13, 2024
1 parent 34f7d1b commit 9ae70a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Security Policy

## Supported Versions
## Supported Versions and their notable differences in Rendering Profile Badges

### Utilizling Linkedin's methods instead with this Com ponent
Version 4.0 or lower utilizes LinkedIn's [script](https://platform.linkedin.com/badges/js/profile.js) to render the badge. If you want to display a LinkedIn profile badge, I suggest using version 4 or an earlier version of the component. These versions are stable and reliable for rendering profile badges, especially if you have some requirements in only rendering profile badges via the official form provided by LinkedIn.

**However**, version 5.0 no longers uses the `profile.js` script and instead carries out the the same tasks using React's lifecycle methods and state management system, removing the need in adding a script tag and relying on an outside script to inject badge content.

Vrsion 5.12.* goes a step even further and no longer utilizes a server-side rendering method by fully rendering the badge through React on the client side. These gradual changes simply add further flexibility and control in how profile badges are rendered, allowing you to properly render and animate badges using any other React components or libraries within your project.

Again, Please note that using version 4 or earlier versions does not mean that they are outdated, as they are still reliable and stable options for rendering profile badges.

Version 4.0 or lower utilizes LinkedIn's [script](https://platform.linkedin.com/badges/js/profile.js) to render the badge. I recommend using version 4 or lower in case you require rendering via LinkedIn's method by any means. Version 4 by the means is a version that has issues or functionality flaws, and is a stable legacy version of the component. Version 5.0 given that it fully integrates rendering within the component and thus utilizes full adherence toward React's lifecycle methods and state management system, provides even fuller abilities in allowing the badge to properly render and animate utilizing any other React components or libraries within your project.

| Version | Supported | Renders using profile.js | Renders through React hooks like profile.js | Renders within itself fully |
| ------- | ------------------ | ------------------------ | ------------------------------------------- | --------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-linkedinbadge",
"version": "5.12.2038",
"version": "5.12.2039",
"description": "The LinkedIn Badge Rendering React Component is a powerful tool for displaying LinkedIn badges on websites. With customizable options and support for both profile and entity badges, this component offers improved features over LinkedIn's basic implementation. It enhances code organization by separating badge container rendering from dynamic content rendering and efficiently handles asynchronous loading of content from LinkedIn servers. This component also allows for easy management of multiple badges on a page and provides a callback function for tracking badge rendering completion. Make sure to review the licensing information for proper usage.",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export default function LinkedInBadge(props: Partial<LinkedInBadgeProps>) {
version={version}
className={props.className}
generateUidWithoutApi={generateUidWithoutApi}
hideViewProfileButton={props.hideViewProfileButton}
id={props.id}
debug={props.debug}
name={name}
Expand Down

0 comments on commit 9ae70a4

Please sign in to comment.