A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/zeusdeux/jwt-example below:

zeusdeux/jwt-example: Playing with user registration, login/logout, auth, etc using JWTs, serverless functions & faunadb as the data store.

This is an example codebase that implements user registration and supports authorization using JWTs using serverless functions and the wonderful FaunaDB.

I wrote this to teach myself how JWTs work and also implement user registration and login/logout, etc flows serverlessly.

Implemented functionality A note on Maybe, Either and match over traditional code structure

I wanted to play with a different way of approaching authoring the code in this repository. Instead of messing with try/catch-es and lots of error handling madness, I have instead opted to push those to the edges as you can see in models/User.helpers.ts and instead wrap those values in Maybes and/or Eithers. These values are then accessed in a declarative manner using match. Their usage, imho, has greatly simplified the code as you can see in the api/*.ts. It's not everyone's ☕and I get that.

More info can be found in files with the same names under they utils/ directory.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4