mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-22 10:48:30 +00:00
fix: make autosignup.mjs work with hydra v2
This commit is contained in:
parent
e1be0a6e92
commit
3111f6fdc4
@ -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 New Issue
Block a user