docs: custom auth strategy requires the collection slug in return value (#11327)
This commit is contained in:
committed by
GitHub
parent
206b4b9d88
commit
fcaf59176d
@@ -62,9 +62,12 @@ export const Users: CollectionConfig = {
|
||||
})
|
||||
|
||||
return {
|
||||
// Send the user back to authenticate,
|
||||
// Send the user with the collection slug back to authenticate,
|
||||
// or send null if no user should be authenticated
|
||||
user: usersQuery.docs[0] || null,
|
||||
user: usersQuery.docs[0] ? {
|
||||
collection: 'users'
|
||||
...usersQuery.docs[0],
|
||||
} : null,
|
||||
|
||||
// Optionally, you can return headers
|
||||
// that you'd like Payload to set here when
|
||||
|
||||
Reference in New Issue
Block a user