Payload CMS

Interact with Payload CMS collections and globals

Overview

This node interacts with the Payload CMS authentication system, specifically supporting the 'Logout' operation for auth-enabled collections. It allows users to log out from a specified authentication collection within Payload CMS. This is useful in workflows where managing user sessions and authentication states is necessary, such as logging out users after certain actions or at the end of a session.

Use Case Examples

  1. Logging out a user from the 'users' auth collection after completing a workflow.
  2. Automating session termination for users in a custom auth collection.

Properties

Name Meaning
Auth Collection Specifies the auth-enabled collection from which the user will be logged out. This determines the context of the logout operation.

Output

JSON

  • json - The JSON response from the Payload CMS logout API, typically confirming the logout action.

Dependencies

  • Requires an API key credential for Payload CMS to authenticate requests.

Troubleshooting

  • Common issues include authentication failures due to invalid or expired API credentials. Ensure the API key credential is valid and has appropriate permissions.
  • Network errors or incorrect base URL/API prefix settings can cause request failures. Verify the Payload CMS instance URL and API prefix configuration.
  • If the specified auth collection does not exist or is not auth-enabled, the logout operation will fail. Confirm the collection name is correct and supports authentication.

Links

Discussion