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

@pga/auth-flow-provider

Package Overview
Dependencies
Maintainers
16
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pga/auth-flow-provider - npm Package Compare versions

Comparing version 0.0.1-0 to 0.0.1-1

2

package.json
{
"name": "@pga/auth-flow-provider",
"version": "0.0.1-0",
"version": "0.0.1-1",
"description": "PGA React Auth Provider Package for OneLogin's Authorization Flow",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,2 +6,3 @@ /* global fetch */

const ANONYMOUS_ROLE = 'ANONYMOUS'
const SESSION_TIMEOUT_CHECK = 2 * 60 * 1000

@@ -17,5 +18,8 @@ const AuthContext = React.createContext()

this.state = { authReady: false, isLoggedIn: false, me: null }
this.sessionTimedId = null
this.fetchSession = this.fetchSession.bind(this)
}
async componentDidMount () {
async fetchSession () {
const { apolloClient, query } = this.props

@@ -47,2 +51,20 @@ const authReady = true

async componentDidMount () {
try {
await this.fetchSession()
} catch (err) {
console.log(err)
}
this.sessionTimedId = setTimeout(this.fetchSession, SESSION_TIMEOUT_CHECK)
console.log('this.sessionTimedId: ', this.sessionTimedId)
}
componentWillUnmount () {
if (this.sessionTimedId) {
clearTimeout(this.sessionTimedId)
}
}
render () {

@@ -49,0 +71,0 @@ const { authReady, isLoggedIn, me } = this.state

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