Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 917 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 917 Bytes

openid-client experimental implementation

The idea was to use openid-client package to cover as many auth providers as possible.

There are three pieces of code:

  • @wasp-lang/auth package that provides createOAuthRouter function that can be used to create a router that can be used to handle OAuth flow
  • api that uses createOAuthRouter and provides a simple API that can be used to login and get the current user
  • frontend that uses api to login and gets the current user

Running it locally

@wasp-lang/auth

Make sure to build and link @wasp-lang/auth package:

cd packages/wasp-auth
npm run build
npm link

API

Install the local package in api with:

cd api
npm link @wasp-lang/auth

Copy env.example to .env and fill in the values.

Run the api with:

npm run dev

Frontend

Run the frontend with:

cd frontend
npm run dev