1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-12 00:34:01 +00:00

feat: add PKCE for non public clients

This commit is contained in:
Elias Schneider
2025-01-03 16:15:10 +01:00
parent 785200de61
commit adcf3ddc66
12 changed files with 59 additions and 9 deletions

View File

@@ -80,11 +80,19 @@ export function createForm<T extends z.ZodType<any, any>>(schema: T, initialValu
});
}
function setValue(key: keyof z.infer<T>, value: z.infer<T>[keyof z.infer<T>]) {
inputsStore.update((inputs) => {
inputs[key].value = value;
return inputs;
});
}
return {
schema,
inputs: inputsStore,
data,
validate,
setValue,
reset
};
}