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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nice-devone/auth-sdk

v24.4.0

Published

NICE CXone Auth SDK

Downloads

308

Readme

NICE CXone Auth SDK

Requirements

  • TypeScript 4.7
  • Runtime: ES2022 (WebSocket, Intl, Promise, EventTarget, CustomEvent, JSON, Date, etc.)
  • Custom application bundler (webpack, create-react-app, etc.)

This is a typescript library for managing user authentication within the NICE CXone platform. It simplifies the process of interacting with the CXone authorization server, obtaining tokens, and handling user information.

Installation

Bash

npm install @nice-devone/auth-sdk

Features

  • Authorization Code Grant Flow: Supports the Authorization Code Grant flow for user authentication.
  • Token Management: Handles access token retrieval, refresh, and expiry checks.
  • OpenID Connect (OIDC) Configuration: Discovers and retrieves OpenID Connect configuration details from the authorization server.
  • User Information: Provides access to user details upon successful authentication.
  • Security: Utilizes secure practices for code verifier generation and token storage (refer to best practices).
  • Background Worker: Leverages a background worker for token refresh monitoring (implementation details might vary).

Peer Dependencies

This library relies on several peer dependencies, including:

@nice-devone/core-sdk
@nice-devone/common-sdk

Ensure these dependencies are also installed and configured correctly for proper functionality.

Getting Started

1. Installation

Install the library:

npm install @nice-devone/auth-sdk

2. Import Required Functionalities

Import the required functionalities from the library:

import { CXoneAuth, CXoneUser, AuthSettings, AuthStatus } from '@nice-devone/auth-sdk';

3. Initialize CXoneAuth Instance

Initialize the CXoneAuth instance with your authentication configuration:

const authSettings: AuthSettings = {
    cxoneHostname: 'https://cxone.dev.niceincontact.com',
    clientId: 'Salesforce Agent Console@inContact Inc.'
};

const auth = CXoneAuth.instance;
auth.init(authSettings);

Refer to the API documentation (link to be retrieved) for detailed usage instructions on specific functionalities like generating authorization URLs, acquiring tokens, and accessing user information.

Security Considerations

Always follow secure coding practices when handling access tokens. Avoid storing them in plain text and consider using secure storage mechanisms. Refer to the official CXone documentation for recommended security practices when using the @nice-devone/auth-sdk.

Additional Notes

This library offers a high-level abstraction over the complexities of CXone authentication. The provided functionalities might vary depending on the specific version of the @nice-devone/auth-sdk.

  • Link to Developer Portal: For detailed information on CXone authentication, including best practices and security considerations, refer to the NICE CXone developer portal page on Authentication: Link to Developer Portal Page on Authentication

We hope this overview aids you in integrating user authentication into your CXone applications using the @nice-devone/auth-sdk library. For further assistance, refer to the official documentation or reach out to NICE CXone support channels.