Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!