cauthy-auth 0.38.0 → 0.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cauthy-C-GoRXy9.d.mts → cauthy-3h6d8YXl.d.mts} +1 -1
- package/dist/{cauthy-BUozWD72.d.ts → cauthy-C-_Bj6-L.d.ts} +1 -1
- package/dist/cli.js +3 -2
- package/dist/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/express.d.mts +2 -2
- package/dist/express.d.ts +2 -2
- package/dist/fastify.d.mts +2 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/hono.d.mts +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/next.d.mts +2 -2
- package/dist/next.d.ts +2 -2
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/{system-DUGV040y.d.mts → system-CqPa5xR5.d.mts} +6 -0
- package/dist/{system-Bz4haPrI.d.ts → system-Dssq1JUJ.d.ts} +6 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -715,9 +715,10 @@ function createSystem(given = {}) {
|
|
|
715
715
|
let asking;
|
|
716
716
|
async function ask() {
|
|
717
717
|
configured();
|
|
718
|
-
const
|
|
718
|
+
const self = key?.clientId || clientId;
|
|
719
|
+
const form = new URLSearchParams({ grant_type: "client_credentials", client_id: self });
|
|
719
720
|
if (key) {
|
|
720
|
-
const assertion = await new SignJWT({}).setProtectedHeader({ alg: "RS256", kid: key.keyId }).setIssuer(
|
|
721
|
+
const assertion = await new SignJWT({}).setProtectedHeader({ alg: "RS256", kid: key.keyId }).setIssuer(self).setSubject(self).setAudience(tokenEndpoint).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("2m").sign(await signingKey());
|
|
721
722
|
form.set("client_assertion_type", ASSERTION_TYPE);
|
|
722
723
|
form.set("client_assertion", assertion);
|
|
723
724
|
} else {
|
|
@@ -1687,7 +1688,8 @@ function createCauthy(given = {}) {
|
|
|
1687
1688
|
// Whether the workspace signs people in with a password at all. A
|
|
1688
1689
|
// Cauthy from before the setting says nothing of it: then it does.
|
|
1689
1690
|
passwordSignIn: settings.data?.allow_password !== false,
|
|
1690
|
-
|
|
1691
|
+
// The workspace's switch, and how the application's own system takes sign-ups.
|
|
1692
|
+
signUp: settings.data?.allow_signup !== false && settings.data?.signup?.mode !== "invite_only",
|
|
1691
1693
|
// The application's system makes an organization per sign-up: the form asks the company's name.
|
|
1692
1694
|
...settings.data?.signup?.organization?.ask === true ? { organization: { ask: true, required: settings.data.signup.organization.required === true } } : {},
|
|
1693
1695
|
// A sign-in link needs a page of the application to open.
|