![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
front-broker-connection
Advanced tools
Readme
JS library for integrating with Front Finance
With npm
:
npm install --save front-broker-connection
With yarn
yarn add front-broker-connection
import { createFrontConnection } from 'front-broker-connection';
// ...
const frontConnection = createFrontConnection({
clientId: '<Your Front Finance Client Id>',
onBrokerConnected: (brokerData: FrontPayload) => {
// use broker account data
},
onExit: (error?: string) => {
if (error) {
// handle error
} else {
// ...
}
}
To open authentication link rpovided by Front Finance Integration API you need to call openLink
method:
frontConnection.openLink(authLink)
ℹ️ See full source code example at react-example/src/ui/Front.tsx
import { createFrontConnection } from 'front-broker-connection'
import {
FrontConnection,
FrontPayload
} from 'front-broker-connection/dist/utils/types'
// ...
const [frontConnection, setFrontConnection] = useState<FrontConnection | null>(
null
)
useEffect(() => {
setFrontConnection(createFrontConnection(options))
}, [])
useEffect(() => {
if (authLink) {
frontConnection?.openLink(authLink)
}
}, [frontConnection, authLink])
return <></>
After successfull authentication on Front Finance user will be redirected back to provided callback URL.
FrontConnection
instance will check if URL contains query parameters, load broker tokens and fire the events.
ℹ️ See src/types/index.ts for exported types.
createFrontConnection
argumentskey | type |
---|---|
clientId | string |
onBrokerConnected | (payload: FrontPayload) => void |
onExit | ((error?: string | undefined) => void) | undefined |
createFrontConnection
return valuekey | type |
---|---|
openLink | () => Promise<void> |
TypeScript definitions for front-broker-connection
are built into the npm package.
FAQs
Front Finance brokerage connection client lib
The npm package front-broker-connection receives a total of 1 weekly downloads. As such, front-broker-connection popularity was classified as not popular.
We found that front-broker-connection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.