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

@developerportalsg/console-radar

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@developerportalsg/console-radar

Listen to route changes for the Developer Console with Console Radar

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

console-radar

For dev console app, there will be multiple tenant apps that exists in iframe.

console-radar is a node package to catch route changes in the tenant app and communicate said change to the parent dev console app.

Installation

npm i @developerportalsg/console-radar --save

Getting Started

import { ConsoleRadar } from "@developerportalsg/console-radar";

const radar = new ConsoleRadar(config.parentEndpoint) // defaults to localhost:3003

// setSessionMngCallback accepts a callback function with isAuthenticated andd csrfToken as the input
// This function will get triggered when csrf message is sent from dev console
let clientSideCsrf = ''
radar.setSessionMngCallback(function({isAuthenticated, csrfToken}){
    if(isAuthenticated){
       clientSideCsrf = csrfToken
    }
})

// notifyExpiredSession will tell parent that current session is expired and to restart the login flow
const notifySessionExpiry = (e) => {
    e.preventDefault()
    radar.notifyExpiredSession()
}

FAQs

Package last updated on 07 Dec 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