How to use the solid-auth-client.on function in solid-auth-client

To help you get started, we’ve selected a few solid-auth-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github solid / react-components / src / UpdateTracker.js View on Github external
return;

  // Invalidate the cache for the resource
  const url = match[1];
  ldflex.clearCache(url);

  // Notify the subscribers
  const update = { timestamp: new Date(), url };
  for (const subscriber of subscribers[url] || [])
    subscriber(update);
  for (const subscriber of subscribers[ALL] || [])
    subscriber(update);
}

// Keep track of all fetched resources
auth.on('request', url => {
  if (!fetchedUrls.has(url)) {
    if (ALL in subscribers)
      trackResource(url);
    fetchedUrls.add(url);
  }
});

solid-auth-client

Opaquely authenticates solid clients

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis

Similar packages