Skip to main content
Download the JWT Authentication for CoCart plugin to use these hooks.
Each action hook is documented below with its description and usage example.

Token Events

cocart_jwt_token_generated

Made available since v2.1.0
Fires when a new JWT token is generated after successful authentication.

cocart_jwt_auth_token_refreshed

Made available since v2.1.0
Fires when a token is refreshed using a refresh token.

cocart_jwt_auth_token_validated

Made available since v2.1.0
Fires when a token is successfully validated.

Token Management

cocart_jwt_auth_token_deleted

Made available since v2.1.0
Fires when a token is deleted.

Authentication Events

cocart_jwt_auth_authenticated

Made available since v3.0.0
Fires when a user is authenticated via JWT token.
All actions follow WordPress coding standards and can be used with the standard add_action() function. The examples above show practical implementations for each action.