From 17939827afd71c3033cecdcaf5120e1776b977ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20S=C3=BCdi?= Date: Tue, 3 Sep 2024 16:46:51 +0200 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 9cea182..ab12fa8 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,14 @@ async findOne( ## Documentation +### Changing the AuthSch provider + +The default AuthSch provider is https://auth.sch.bme.hu. If you need to override it, you can do so, using the `AUTHSCH_PROVIDER` environment variable. + +```bash +AUTHSCH_PROVIDER=https://authscham.vercel.app npm run start +``` + ### AuthSchScope and AuthSchProfile The available scopes of AuthSCH can be found [here](https://git.sch.bme.hu/kszk/authsch/-/wikis/api#scope-ok). The `AuthSchScope` is an enum that maps to these scopes. The `validate` method will get an object with type `AuthSchProfile` as parameter, which is not the same that AuthSch returns and their documentation describes. Here you can read the mapping in the following format: enum name - scope name - property (or properties) in AuthSchProfile. **NOTE: Only those properties will be on the object in the validate method whose scope was provided in the constructor. The other fields will be undefined, but the type can't reflect that!**