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

@apchh/apc-auth-ngxs

v0.1.2

Published

This library's purpose is to make authentication of Angular 2+ applications fast an easy with a prebuilt, library that directly integrates with APC's authentication API. This Library is intended to be used with Angular Applications that arer set up using

Readme

APC Authentication using NGXS

This library's purpose is to make authentication of Angular 2+ applications fast an easy with a prebuilt, library that directly integrates with APC's authentication API. This Library is intended to be used with Angular Applications that arer set up using the NGXS library for App State Managment.

Peer dependencies

This project requires the following packages besides the default Angular packages.

  • jwt-decode - For decoding Json Web Tokens.
  • @ngxs/store - NGXS State Managment Library
  • @ngxs/storage-plugin - For managing Session Storage within the application.

Installation

You can add the package to your Angular application by either

npm install --save @apchh/apc-auth-ngxs

or

yarn add @apchh/apc-auth-ngxs
Update your app.module.ts

Update your app.module.ts file by integrating the code below into your pre-existing code.

const appConf: IConfig = {
    applicationId: 'apc applicationId'
};

@ngModule({
    imports: [
        APCAuthNGXSModule.forRoot(appConf)      
    ],
    providers: [AuthService]
});

The purpose of the IConfig typechecked variable is to specify to the Authentication library, an ApplicationId, and in the future, more application information that the Auth API will need to determine where the login requests are coming from, and properly authenticate the requests.

Implementing Authentication Guards

You can use the Auth Guard within the APC-Auth-RXJS library to protect your routes by simply adding the AuthGuard to the canActivate route field. Then add a route to login using the SignInComponent provided by the library.

import { AuthGuard, SignInComponent } from 'apc-auth-rxjs';

const routes: Routes = [
    {
        path: '',
        component: HomeComponent,
        canActivate: [AuthGuard]
    }, {
        path: 'login',
        component: SignInComponent
    }
]

Dev Tools

During development, I would recommend you install the @ngxs/devtools-plugin and add it to your app.module.ts file. This plugin along with the Redux Dev Tools Plugin for your specific browser, will let you access a Redux tool in the Dev Tools section of your browser. With this plugin, your app will communicate with the browser's Dev Tools and display usefull Redux state managment information.

TODOs

  • Implement JWT Token Interceptors to verify active session
  • Implenent JWT Token Interceptor to append token to any and all requests
  • Questioning whether or not to make Registration and change user information components or leave that to developers.