seamapi / prefixed-api-key

Module for generating a prefixed API Key
MIT License
293 stars 13 forks source link

FYI : Safer re-implementation of prefixed-api-key #9

Open grempe opened 1 year ago

grempe commented 1 year ago

Hi, just wanted to say thanks for the initial version of this library you've provided. I took inspiration from it, but wanted a version that was more secure, both in its use of cryptography, and in runtime validation. I like the approach, and I also found inspiration in this blog post: https://fly.io/blog/api-tokens-a-tedious-survey/

I've taken the liberty to fork this repo and rewrite it. This would also address the #1, #2, and #4 issues.

Major changes:

A sample of the new key:

mycompany_key_01GVDPRNNV4P4593VH1A0DR7RN_1372dpVKCbEvLfM6nMsDL75GrspAj2osNVyp5RLM2s5oTjiBm

This is of course, no longer compatible, hence the hard fork and not a pull-request.

Any feedback appreciated. I'll be publishing it shortly.

https://github.com/truestamp/prefixed-api-key

Cheers.

seveibar commented 11 months ago

A bit late on this, but nice fork! We should add a link in the README

codetheweb commented 9 months ago

looks great! was going to try it out today but I think the package is either missing from NPM or private?