New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rook-provider

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rook-provider

RookMotion Auth contains a Provider to notify the submodules if the apps is authorized by the given token

  • 0.5.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

RookMotion Auth

RookMotion Auth contains a Provider to notify the submodules if the apps is authorized by the given token

Instalation

npm

npm i rook-provider

yarn

yarn add rook-provider

Usage

The package include a component call RookMotionProvider, it should preferably be used at the root of your component tree. RookMotionProvider needs the token that was given to you.

import { RookMotionProvider } from 'rook-provider'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <React.StrictMode>
    <RookMotionProvider token='YOUR-TOKEN'>
      <App />
    </RookMotionProvider>
  </React.StrictMode>
)

Then to verify if the apps was allowed you need to use the hook useRookAuth, this give you two flags:

  • ready: indicate if the package is fully loaded
  • authenticated: indicate if the app was allowed.
import { useRookAuth } from 'rook-provider'

const myComponent = () => {
...
const { ready, authenticated } = useRookAuth()
...
}

FAQs

Package last updated on 04 Oct 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc