mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-29 05:20:56 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ export async function hydraAutoSignup(req) {
|
||||||
|
|
||||||
let client;
|
let client;
|
||||||
if (resp.data.length <= 0) {
|
if (resp.data.length <= 0) {
|
||||||
client = await hydraAdmin.createOAuth2Client(clientModel);
|
const createResp = await hydraAdmin.createOAuth2Client(clientModel);
|
||||||
|
client = createResp.data;
|
||||||
} else {
|
} else {
|
||||||
client = resp.data[0];
|
client = resp.data[0];
|
||||||
await hydraAdmin.setOAuth2Client(client.client_id, clientModel);
|
await hydraAdmin.setOAuth2Client(client.client_id, clientModel);
|
||||||
|
|
Loading…
Reference in a new issue