added cookie to config + fixed config set endpoint

This commit is contained in:
dswbx
2024-11-25 16:57:12 +01:00
parent 824ff40133
commit 16a6a3315d
14 changed files with 114 additions and 47 deletions

View File

@@ -63,7 +63,8 @@ export class AppAuth extends Module<typeof authConfigSchema> {
});
this._authenticator = new Authenticator(strategies, this.resolveUser.bind(this), {
jwt: this.config.jwt
jwt: this.config.jwt,
cookie: this.config.cookie
});
this.registerEntities();
@@ -115,6 +116,9 @@ export class AppAuth extends Module<typeof authConfigSchema> {
identifier,
profile
});
if (!this.config.allow_register && action === "register") {
throw new Exception("Registration is not allowed", 403);
}
const fields = this.getUsersEntity()
.getFillableFields("create")