How to verify the user session periodically

I want to periodically check the user session. I’m using Gatsby, my implementation basically do a silent auth when the gatsby-browser.js mounts.
I want to periodically check the user session.
I’m using auth0-js 9.14.0.

handleCheckSession = () => {
    this.setState({ loading: false })
  }

  componentDidMount() {
    silentAuth(this.handleCheckSession)
  }

Hi @frnlucas ,

Welcome to the Auth0 Community!

I understand that you want to periodically check use session. Auth0 SDK has checkSession method. Details are here. Hope this helps!

1 Like