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

@annalib/anna-cognito-lib

v48.0.0-final-ng-19

Published

1. Install the package from npm `npm install @annalib/anna-cognito-lib` (if not working use with --force flag). 2. After installing the Library, you need to install it's peer dependancies. You can find the peer-dependecies in package.json file of libra

Downloads

1,753

Readme

AnnaCognitoLib

How to use the library in the consuming project ?

  1. Install the package from npm npm install @annalib/anna-cognito-lib (if not working use with --force flag).
  2. After installing the Library, you need to install it's peer dependancies. You can find the peer-dependecies in package.json file of library. Install all the peer depedencies with respective version number mentioned. this is important step otherwise library will throw error. ex: npm install [email protected]
  3. Also make sure to Install the Roboto font locally in assets folder of your consuming project.

If using the library locally (library from your system locally not npm),then in angular json file you have to set preserveSymlinks: true.

Adding Configuration

  1. import the AnnaCognitoLibModule module and pass the configuration to root AnnaCognitoLibModule.forRoot(appGenericConfig)
  2. configuration const should be:
       cognito : {
         userPoolId: "",
         clientId: "",
       },
       loginPageLogoImgUrl: ""
     } ```
  3. Keep the logo image in consuming project and provide the path for loginPageLogoImgUrl. ex: "assets/images/Anna-Logo.png" Note: for better loading of logo image, provide logo image in minified format.

Adding new custom function implemetation for any service file.

  1. Background Understanding - when we want to provide custom implemenetation - We write the custom implementation in a service file of consuming project and that is injected in the library. Injection is taken care by library itself. You just need to provide the definition and implementation of new function added.
  2. Ex: let's say we want to add a new function `onSuccessfulAuthenticatingUser() this function is called from library when user is succesfully authenticated and logged in. (Note: this function is already present in lib).
  3. Then In library add the new function declaration onSuccessfulAuthenticatingUser() in interface file IAuthService of auth-service.token.ts file.
  4. In consuming project, for onSuccessfulAuthenticatingUser() provide the implementation in the service file say AuthService of auth.service.ts.
  5. Then In consuming project, app.module.ts file add following in providers array. { provide: AUTH_SERVICE_TOKEN, useExisting: AuthService } i.e. your consuming project's existing AuthService will be injected in Library's auth-service file with the help of AUTH_SERVICE_TOKEN.
  6. Now you're good to go!

List of function implementation we need to provide in consuming project.

  1. onSuccessfulAuthenticatingUser() - provide the implementation of what happens when user is succefully logged in. (any API call or routing you need to provide).
  2. isUsernameAvailable() - in thie implementation call an backend API to find out if username is already present in Database or not. format of response should be {"isUsernameAvailable":true}. This is used in forgot-password page before calling forgot-password cognito sdk call, we need to check thorough backend db if the username is actually available.
  3. isLoggingIn - set this variable to false. this will stop the spinner on top on button. use case: after successful login i.e. when we are done with all API call we need to call post succesfull calling or when we have routed to home page.

How to make changes in library and build it

  1. Make the changes and Run ng build anna-cognito-lib to build the project.
  2. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build anna-cognito-lib, go to the dist folder cd dist/anna-cognito-lib and run npm publish.