@djangocfg/api 2.1.546 → 2.1.547
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/auth.cjs +331 -73
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +90 -1
- package/dist/auth.d.ts +90 -1
- package/dist/auth.mjs +331 -73
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +18 -0
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +96 -0
- package/dist/clients.d.ts +96 -0
- package/dist/clients.mjs +18 -0
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +171 -3
- package/dist/index.d.ts +171 -3
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/_cfg_accounts/hooks/index.ts +1 -0
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsTokenCreate.ts +64 -0
- package/src/_api/generated/_cfg_accounts/openapi.json +157 -0
- package/src/_api/generated/_cfg_accounts/schemas/PasswordLoginError.ts +13 -0
- package/src/_api/generated/_cfg_accounts/schemas/PasswordLoginRequest.ts +13 -0
- package/src/_api/generated/_cfg_accounts/schemas/PasswordLoginResponse.ts +18 -0
- package/src/_api/generated/_cfg_accounts/schemas/index.ts +3 -0
- package/src/_api/generated/openapi.json +157 -0
- package/src/_api/generated/sdk.gen.ts +20 -1
- package/src/_api/generated/types.gen.ts +149 -0
- package/src/auth/__tests__/passwordLogin.test.tsx +239 -0
- package/src/auth/context/AccountsContext.tsx +32 -7
- package/src/auth/context/AuthContext.tsx +104 -1
- package/src/auth/context/types.ts +10 -1
- package/src/auth/hooks/useAuthForm.ts +84 -0
- package/src/auth/hooks/useAuthFormState.ts +3 -0
- package/src/auth/types/form.ts +41 -1
- package/src/auth/types/index.ts +2 -0
- package/src/auth/utils/analytics.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -2062,6 +2062,24 @@ var CfgAccountsAuth = class {
|
|
|
2062
2062
|
static {
|
|
2063
2063
|
__name(this, "CfgAccountsAuth");
|
|
2064
2064
|
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Obtain a JWT pair with email + password.
|
|
2067
|
+
*
|
|
2068
|
+
* Returns the same envelope as OTP verify: either ``requires_2fa=True`` with
|
|
2069
|
+
* a session id, or the token pair plus the user object. Failures are uniform
|
|
2070
|
+
* (401 ``invalid_credentials``) whether the email is unknown, the password is
|
|
2071
|
+
* wrong, or the account is inactive/soft-deleted — no enumeration.
|
|
2072
|
+
*/
|
|
2073
|
+
static cfgAccountsTokenCreate(options) {
|
|
2074
|
+
return (options.client ?? client).post({
|
|
2075
|
+
url: "/cfg/accounts/token/",
|
|
2076
|
+
...options,
|
|
2077
|
+
headers: {
|
|
2078
|
+
"Content-Type": "application/json",
|
|
2079
|
+
...options.headers
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2065
2083
|
/**
|
|
2066
2084
|
* Revoke a refresh token (logout).
|
|
2067
2085
|
*
|