Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

166
Vistas
How to create npm package with the security

I need to create an npm package with security in form of api key an client id, I want to create something like is in a e.q. Stripe package that we import a main class and pass client_id and api_key into the class params :

import Stripe from 'stripe';

const stripe = new Stripe('api_key', 'client_id');

stripe.customers.create(); //if proper keys

And now i have a questions, for first, How to create a package with only one access point(like new Stripe(...) where we pass an auth data(any tutorial please)?, and second, How to properly secure all of the functions in the library when auth data is not properly?

thanks for any help!

ps. if you have a nice tutorial or article about create npm packages with secure(like providing api_keys) i will be greatefull!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda