2021-07-08 11:20:13 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = {
|
2021-08-13 15:35:19 +02:00
|
|
|
default: ({ env }) => ({
|
|
|
|
jwtSecret: env('JWT_SECRET'),
|
|
|
|
jwt: {
|
|
|
|
expiresIn: '30d',
|
|
|
|
},
|
|
|
|
ratelimit: {
|
|
|
|
interval: 60000,
|
|
|
|
max: 10,
|
|
|
|
},
|
2021-08-19 16:49:33 +02:00
|
|
|
layout: {
|
|
|
|
user: {
|
|
|
|
actions: {
|
2021-11-04 15:18:09 +01:00
|
|
|
create: 'contentManagerUser.create', // Use the User plugin's controller.
|
|
|
|
update: 'contentManagerUser.update',
|
2021-08-19 16:49:33 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-04-05 09:12:04 +02:00
|
|
|
callback: {
|
|
|
|
validate(url, provider) {
|
|
|
|
const uCallback = new URL(url);
|
|
|
|
const uRedirect = new URL(provider.redirectUri);
|
|
|
|
|
|
|
|
// The default validation checks that the provided callback's origin matches the provider redirectUri origin
|
|
|
|
if (uCallback.origin !== uRedirect.origin) {
|
|
|
|
throw new Error(
|
|
|
|
`Forbidden callback provided: origins don't match (${uCallback.origin} !== ${uRedirect.origin})`
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2021-08-13 15:35:19 +02:00
|
|
|
}),
|
2021-09-13 12:03:12 +02:00
|
|
|
validator() {},
|
2021-07-08 11:20:13 +02:00
|
|
|
};
|