<?php
$query = \Drupal::entityTypeManager()->getStorage('oauth2_token')->getQuery();
$entity_ids = $query->execute();
$results = \Drupal::entityTypeManager()->getStorage('oauth2_token')->loadMultiple(array_values($entity_ids));
//var_dump($results);
\Drupal::entityTypeManager()->getStorage('oauth2_token')->delete($results);
Created
October 18, 2021 10:01
-
-
Save zuhairkareem/c33efbf785b18641b3b4c1999bb7be89 to your computer and use it in GitHub Desktop.
delete all oAuth2 tokens - Drupal 8/9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment