@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/clients.cjs
CHANGED
|
@@ -2019,6 +2019,24 @@ var CfgAccountsAuth = class {
|
|
|
2019
2019
|
static {
|
|
2020
2020
|
__name(this, "CfgAccountsAuth");
|
|
2021
2021
|
}
|
|
2022
|
+
/**
|
|
2023
|
+
* Obtain a JWT pair with email + password.
|
|
2024
|
+
*
|
|
2025
|
+
* Returns the same envelope as OTP verify: either ``requires_2fa=True`` with
|
|
2026
|
+
* a session id, or the token pair plus the user object. Failures are uniform
|
|
2027
|
+
* (401 ``invalid_credentials``) whether the email is unknown, the password is
|
|
2028
|
+
* wrong, or the account is inactive/soft-deleted — no enumeration.
|
|
2029
|
+
*/
|
|
2030
|
+
static cfgAccountsTokenCreate(options) {
|
|
2031
|
+
return (options.client ?? client).post({
|
|
2032
|
+
url: "/cfg/accounts/token/",
|
|
2033
|
+
...options,
|
|
2034
|
+
headers: {
|
|
2035
|
+
"Content-Type": "application/json",
|
|
2036
|
+
...options.headers
|
|
2037
|
+
}
|
|
2038
|
+
});
|
|
2039
|
+
}
|
|
2022
2040
|
/**
|
|
2023
2041
|
* Revoke a refresh token (logout).
|
|
2024
2042
|
*
|