Skip to content

Commit 6f4c18a

Browse files
authored
Fix the filter code snippet
1 parent d0faaab commit 6f4c18a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ The plugin offers some filters to hook into.
130130
**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.**
131131

132132
```php
133-
add_filter('graphql_jwt_auth_expire', 60);
133+
function custom_jwt_expiration( $expiration ) {
134+
return 60;
135+
}
136+
137+
add_filter('graphql_jwt_auth_expire', 'custom_jwt_expiration', 10);
134138
```
135139

136140
- Argument: Expiration in seconds

0 commit comments

Comments
 (0)