From 6f4c18ada3382f51c8aa690aaec3bad994af13f3 Mon Sep 17 00:00:00 2001 From: Henrik Wirth Date: Thu, 27 Aug 2020 12:36:16 +0200 Subject: [PATCH] Fix the filter code snippet --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b8424d8..f5613c2 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,11 @@ The plugin offers some filters to hook into. **Note: For security, we highly recommend, that the Auth Token is short lived. So do not set this higher than 300 seconds unless you know what you are doing.** ```php -add_filter('graphql_jwt_auth_expire', 60); +function custom_jwt_expiration( $expiration ) { + return 60; +} + +add_filter('graphql_jwt_auth_expire', 'custom_jwt_expiration', 10); ``` - Argument: Expiration in seconds