npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eccomix-react-auth

v1.0.6

Published

React client package helping with authorization using Eccomix API.

Readme

React client package helping with authorization using Eccomix API.

  1. Configuration
  2. Provider
  3. Hook
    1. Methods and Properties

Configuration

Import EccomixAuthProvider provider from package, and apply valid settings.

Settings structure:

| Property | Type | Description | Example | | ------------------------ | -------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------- | | src | string | The base URL of the application. | https://example.app.com | | usersUrl | string | The Eccomix API endpoint for user-related operations. | https://example-api.example.com | | postMessageUrl | string | The URL to redirect to after a successful Eccomix login. | https://example.app.com | | applicationDefinitions | Record<string, IAppDefinition> | A mapping of app identifiers to their definitions for toolbar generation. | { "calendar": { name: "Calendar", ... } } |

interface IAppDefinition {
  name: string;
  iconBase64?: string;
  icon: string;
  label: string;
  shortLabel?: string;
  color?: string;
}

Provider

Import EccomixAuthProvider provider from package.

import { EccomixAuthProvider } from "eccomix-react-auth";

Add configured EccomixAuthProvider to your React app, wrapping component in which package hook will be used.

Below example shows how app ExampleApp available under https://example.app.com would authenticate with Eccomix Instance https://example-api.example.com.

<EccomixAuthProvider
  settings={{
    src: "https://example.app.com",
    usersUrl: "https://example-api.example.com",
    postMessageSrc: "https://example.app.com",
    applicationDefinitions: {
      ExampleApp: {
        label: "ExampleApp label",
        shortLabel: "ExampleApp short label",
        theme: "blue",
        icon: "ExampleApp",
        color: "#2096F3",
      },
    },
  }}
>
  <App />
</EccomixAuthProvider>

Hook

Import useEccomixAuth hook from package. Hook works only inside provider context.

import { useEccomixAuth } from "eccomix-react-auth";

Methods and Properties

| Name | Description | Parameters | Returns | | ---------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | token | Current authentication token. | – | string \| undefined | | userId | Current user ID. | – | string \| undefined | | reload | Re-initializes the client, optionally with a forced user. | forceUser?: { userId: string; token: string } | Promise<IAppInitConfig> | | login | Logs in with username and password. | { username: string; password: string } | Promise<AxiosResponse<string>> | | loginSocial | Logs in using a social provider. | { type: string; accessToken: string } | Promise<any> | | register | Registers a new user. | { username: string; password: string; firstName: string; lastName: string } | Promise<AxiosResponse<Omit<IRegisterUserParams, 'password'> & { id: string }>> | | resetPassword | Initiates password reset for a username. | { username: string } | Promise<any> | | recoverPassword | Completes password recovery with token. | { username: string; token: string; password: string } | Promise<any> | | verifyToken | Verifies a token and returns user info. | { token: string } | Promise<AxiosResponse<IUserInfoResponse>> | | logout | Logs out the current user. | – | Promise<AxiosResponse<void>> | | hasAccess | Checks if the user has access to a given application. | name: string, data: T | Promise<T> | | getToolbarData | Loads toolbar data for the current user/session. | { applicationId }?: { applicationId?: string } | Promise<IAppToolbarData> | | showLoader | Shows a loading overlay. | elementId?: string | void | | hideLoader | Hides the loading overlay. | elementId?: string | void | | renderAppSuspended | Renders a suspended app message. | replaceElement: string, options: Partial<{ ... }> | HTMLDivElement | | goToLogin | Redirects to the login page. | state?: object | void | | goToPortal | Redirects to the portal (main app) page. | – | void |