fix: use the slug for authentication header API Key
BREAKING CHANGE: replaced the useAPIKey authentication header format to use the collection slug instead of the collection label. Previous: `${collection.labels.singular} API-Key ${apiKey}`, updated: `${collection.slug} API-Key ${apiKey}`
This commit is contained in:
@@ -8,7 +8,7 @@ export default (payload: Payload, { Model, config }): PassportAPIKey => {
|
||||
const { secret } = payload;
|
||||
const opts = {
|
||||
header: 'Authorization',
|
||||
prefix: `${config.labels.singular} API-Key `,
|
||||
prefix: `${config.slug} API-Key `,
|
||||
};
|
||||
|
||||
return new PassportAPIKey(opts, true, async (apiKey, done, req) => {
|
||||
|
||||
Reference in New Issue
Block a user