Hi there!
Just switched my auth from JWT module to simple_oauth. I am wondering how to export and re-import on another site my clients, keeping the uuid.
Basically, I need to be able to spin up dev site very easily without having to configure anything. So I have an install script that does everything I need but I wan't able to find a way to export/import clients.
For now, the only way I have found is to execute this to generate the same client. Might not be bad, but I am wondering if you have a better idea. (I have tried the module default_content as well)
use Drupal\consumers\Entity\Consumer;
$consumer = Consumer::create(array(
'uuid' => 'a47ae134-a1e7-431e-a477-6ac2738e4c97',
'owner_id' => '1',
'label' => 'Web',
'langcode' => 'und',
'third_party' => '0',
'confidential' => 1,
'roles' => array('api'),
'secret' => 'test12345'
));
$consumer->save();
Thanks for your help!
Ed
Comments
Comment #2
heyddi commentedI resolved it by using migrate from a csv in a .install. Like it is done in contentacms.