Skip to content

Commit e421e35

Browse files
committed
cleanup
1 parent 8bb462d commit e421e35

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,6 @@ pg_restore -h localhost --verbose --clean --no-owner --no-privileges -U postgres
307307
## Speed Improvements
308308
If the API and the Database are running on the same server, you can improve the speed by disabling the tcp connection for the database. This can be done by setting the `DATABASE_URL` to `postgresql://teaching_website:teaching_website@localhost/teaching_website?sslmode=disable`.
309309

310-
## Troubleshooting
311-
312-
> [!Caution]
313-
> Authentication Error: When your API can not authenticate requests
314-
> - set the debug level in authConfig to 'info' and check the logs
315-
> - when it is a 401 error and the issue is about `Strategy.prototype.jwtVerify can not verify the token`, ensure to set `"requestedAccessTokenVersion": 2` in the API manifest (!! **not** in the Frontend's manifest, there it must still be `null` !!)
316-
317-
318310
## CMS
319311

320312
For the cms to work properly, you need to register a github app under https://github.com/settings/apps. The following settings are required:

src/routes/authConfig.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
import { Role } from '../models/User';
22

3-
interface Credentials {
4-
tenantID: string;
5-
clientID: string;
6-
}
7-
interface Metadata {
8-
authority: string;
9-
discovery: string;
10-
version: string;
11-
}
12-
interface Settings {
13-
validateIssuer: boolean;
14-
passReqToCallback: boolean;
15-
loggingLevel: 'info' | 'warn' | 'error';
16-
}
173
export interface AccessMatrix {
184
[key: string]: {
195
path: string;
@@ -22,20 +8,10 @@ export interface AccessMatrix {
228
}
239

2410
interface Config {
25-
credentials: Credentials;
26-
metadata: Metadata;
27-
settings: Settings;
2811
accessMatrix: AccessMatrix;
2912
}
3013

3114
const authConfig: Config = {
32-
credentials: { tenantID: process.env.MSAL_TENANT_ID || '', clientID: process.env.MSAL_CLIENT_ID || '' },
33-
metadata: {
34-
authority: 'login.microsoftonline.com',
35-
discovery: '.well-known/openid-configuration',
36-
version: 'v2.0'
37-
},
38-
settings: { validateIssuer: true, passReqToCallback: false, loggingLevel: 'warn' },
3915
accessMatrix: {
4016
checklogin: { path: '/checklogin', access: [{ methods: ['GET'], minRole: Role.STUDENT }] },
4117
user: { path: '/user', access: [{ methods: ['GET', 'POST'], minRole: Role.STUDENT }] },

0 commit comments

Comments
 (0)