4
0
Fork 0
mirror of https://github.com/rocky-linux/peridot.git synced 2024-12-28 13:00:57 +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:
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

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