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

uae-frontend-auth1

v1.0.20

Published

Makes use of the following APIs: - **/user/device** for device uuid creation - **/user/visit** for visit creation - **/user/ip** for session verification and ip data retrieval - **/user/enquiries** for enquiry data retrieval

Downloads

14

Readme

✨ URL, Enquiry, Device, Visit and IP verification

Makes use of the following APIs:

  • /user/device for device uuid creation
  • /user/visit for visit creation
  • /user/ip for session verification and ip data retrieval
  • /user/enquiries for enquiry data retrieval

🚀 Installation

$ npm install uae-frontend-auth

🔧 Usage

import { AuthProvider } from 'uae-frontend-auth';

const App = () => {
  return (
    <AuthProvider>
      <BeforeAnyApplicationLogic/>
    </AuthProvider>
  );
};

For accessing the deviceUuid, visitId, ip data, countryProductId and enquiry data, you can use the following hook:

import { useAuth } from 'uae-frontend-auth';

const {
    enquiryId, // string, enquiry id; null if not available or loading is true
    enquiries, // array of objects, enquiry data; empty array if not available or loading is true
    countryProductId, // number, country product id; null if not available or loading is true
    deviceUuid, // string, device uuid; null if not available or loading is true
    visitId, // number, visit id; null if not available or loading is true
    IPData, // object containing ip data; empty object if not available or loading is true
    loading, // boolean, true if authentication is in progress
} = useAuth();

enquiryId, deviceUuid, visitId, countryProductId and sourceId are also stored in the local storage. You can access them directly from the local storage as well. visitId key in the local storage is

"visitId_${countryProductId}"

Others are stored as it is.

📝 Note

  • Three events are fired during the lifecycle of enquiry API:
    • ENQUIRY_API_INITIATED when the API is initiated
    • ENQUIRY_API_SUCCESS when the API is successful
    • ENQUIRY_API_FAILURE when the API fails
  • The following environment variables are required (if not present, the application will not start):
    • REACT_APP_ENV
    • REACT_APP_ENQUIRY_ENCRYPTION_IV_NEW
    • REACT_APP_ENQUIRY_ENCRYPTION_KEY_NEW

Author