Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
#Payload lib to handle OAuth in this context?
1 messages ยท Page 1 of 1 (latest)
Plus their docs quite suck ๐
You can add this to the access function of your user collection to restrict access to only allow users that have a admin role to the admin panel.
access: {
...
admin: ({ req: { user } }) =>
user?.roles.some((role) => role === 'admin') ?? false,
},
That was not my question, but tnx I guess ๐