Skip to content

robconery/pg-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Bit of Crazy

I'm fairly certain that the existence of this repo will cause anxiety. It's just a thought exercise - people have asked, so here it is.

This is the Postgres Authentication stuff - meaning it's a full authentication system in a box, in your DB. I flipped out one weekend and decided to see if I could do it... I could, so here it is.

Still a bit raw, but tests are passing nicely. Still need to work on a few things.

Installation

I tried to make everything as self-contained as I could. So, to install this just crack open index.js and set DB to whatever local database you want to use.

And then...

npm install
node index.js

This will execute a bulk SQL transaction against your database and will:

  • Create a schema called "membership"
  • Install pgcrypto for hashing passwords
  • Drop in the schema, tables, functions etc needed for this crazy

Development

If you want to play around, the test db is called pg_auth and I build it on the fly. You can see all the scripts in the build/src directory - these get built and dropped into build/dist. If all you want is to check stuff out just install as above and have a good time.

This is Supposed To Be Fun

I like seeing what Postgres can do, and I'm not the world's best programmer so if you see some things that are interesting, have some fun.

About

A complete authentication system built in Postgres using schemas and functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published