Merge pull request #166 from mstg/frontend-common-autosignup-fix-v2
fix: make autosignup.mjs work with hydra v2
This commit is contained in:
commit
cedf1d1db1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue