From 3111f6fdc4ed8de2b1ac643582cd3c7e965bd228 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Fri, 23 Feb 2024 23:44:11 +0100 Subject: [PATCH] fix: make autosignup.mjs work with hydra v2 --- hydra/pkg/hydra/autosignup.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hydra/pkg/hydra/autosignup.mjs b/hydra/pkg/hydra/autosignup.mjs index 1463cb10..b2e1eaaf 100644 --- a/hydra/pkg/hydra/autosignup.mjs +++ b/hydra/pkg/hydra/autosignup.mjs @@ -133,7 +133,8 @@ export async function hydraAutoSignup(req) { let client; if (resp.data.length <= 0) { - client = await hydraAdmin.createOAuth2Client(clientModel); + const createResp = await hydraAdmin.createOAuth2Client(clientModel); + client = createResp.data; } else { client = resp.data[0]; await hydraAdmin.setOAuth2Client(client.client_id, clientModel);