Skip to content

JWT token based authentication API endpoints in Elysia.js, a web framework for Bun.js

License

Notifications You must be signed in to change notification settings

msalihaltun/elysia-jwt-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elysia-jwt-example

A tiny example that implements token based authentication in bun and elysia.

Inspirations from this blog post by Mihai-Adrian Andrei.

Try locally

  • Install bun.
  • Clone this repository.
  • Run bun i to install the necessary packages.
  • Run bunx prisma generate to initialize the sqlite database from the prisma schema file.
  • Set environment variables
    • DATABASE_URL (since I used sqlite this was set to file:./dev.db)
    • JWT_ACCESS_SECRET
    • JWT_REFRESH_SECRET
  • Run bun run dev to start the application.

About

JWT token based authentication API endpoints in Elysia.js, a web framework for Bun.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published