Merge pull request #166 from mstg/frontend-common-autosignup-fix-v2

fix: make autosignup.mjs work with hydra v2
This commit is contained in:
resf-prow[bot] 2024-02-23 22:59:26 +00:00 committed by GitHub
commit cedf1d1db1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);