fix: make autosignup.mjs work with hydra v2

This commit is contained in:
Mustafa Gezen 2024-02-23 23:44:11 +01:00
parent e1be0a6e92
commit 3111f6fdc4
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
1 changed files with 2 additions and 1 deletions

View File

@ -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);