Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/react

Package Overview
Dependencies
Maintainers
1
Versions
1319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/react

![alt text](https://fronteggstuff.blob.core.windows.net/frongegg-logos/logo-transparent.png)

  • 2.2.0-alpha.788357573
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by9.69%
Maintainers
1
Weekly downloads
 
Created
Source

Frontegg React

alt text

Frontegg is a web platform where SaaS companies can set up their fully managed, scalable and brand aware - SaaS features and integrate them into their SaaS portals in up to 5 lines of code.

BREAKING CHANGES SINCE VERSION 2.1.0

The new @frontegg/react uses AdminPortal and LoginBox instead of multiple components.

Installation

Use the package manager npm to install frontegg React.JS library.

npm install @frontegg/react

Configuration

Wrap your application with Frontegg Provider:

import { FronteggProvider } from '@frontegg/react'

const contextOptions = {
  baseUrl: 'https://{HOST}.frontegg.com',                             // You backend base URL (frontegg will direct the requests to it)
}

export const App = () => {
  return <FronteggProvider contextOptions={contextOptions}>
    {/*...*/}
  </FronteggProvider>
}

Usage

You can use React Hooks to access Frontegg store.

import { useAuthUser } from '@frontegg/react'

const HomePage = () => {
  const user = useAuthUser();

  return <div>
    Logged In user: {user.email}
  </div>
}

Openning the Admin Portal is available via the following code snippet.

import { AdminPortal } from '@frontegg/react'

const Toolbar = () => {

  return <nav>
    {/*... your application tabs ...*/}

    <button onClick={() => AdminPortal.show()}>
      Open Admin Portal
    </button>
  </nav>
}

FAQs

Package last updated on 27 Apr 2021

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