We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 206b4b9 commit fcaf591Copy full SHA for fcaf591
docs/authentication/custom-strategies.mdx
@@ -62,9 +62,12 @@ export const Users: CollectionConfig = {
62
})
63
64
return {
65
- // Send the user back to authenticate,
+ // Send the user with the collection slug back to authenticate,
66
// or send null if no user should be authenticated
67
- user: usersQuery.docs[0] || null,
+ user: usersQuery.docs[0] ? {
68
+ collection: 'users'
69
+ ...usersQuery.docs[0],
70
+ } : null,
71
72
// Optionally, you can return headers
73
// that you'd like Payload to set here when
0 commit comments