@djangocfg/api 2.1.583 → 2.1.585

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.
Files changed (57) hide show
  1. package/dist/OAuthTokenResponse-WEDM6IP5.mjs +19 -0
  2. package/dist/OAuthTokenResponse-WEDM6IP5.mjs.map +1 -0
  3. package/dist/OTPVerifyResponse-P5LDNM7H.mjs +20 -0
  4. package/dist/OTPVerifyResponse-P5LDNM7H.mjs.map +1 -0
  5. package/dist/PasswordLoginResponse-33B576NG.mjs +20 -0
  6. package/dist/PasswordLoginResponse-33B576NG.mjs.map +1 -0
  7. package/dist/auth.cjs +12 -28
  8. package/dist/auth.cjs.map +1 -1
  9. package/dist/auth.d.cts +14 -41
  10. package/dist/auth.d.ts +14 -41
  11. package/dist/auth.mjs +12 -26
  12. package/dist/auth.mjs.map +1 -1
  13. package/dist/clients.cjs +0 -1
  14. package/dist/clients.cjs.map +1 -1
  15. package/dist/clients.d.cts +13 -41
  16. package/dist/clients.d.ts +13 -41
  17. package/dist/clients.mjs +0 -1
  18. package/dist/clients.mjs.map +1 -1
  19. package/dist/hooks.cjs +0 -1
  20. package/dist/hooks.cjs.map +1 -1
  21. package/dist/hooks.mjs +0 -1
  22. package/dist/hooks.mjs.map +1 -1
  23. package/dist/index.cjs +0 -1
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +7 -64
  26. package/dist/index.d.ts +7 -64
  27. package/dist/index.mjs +0 -1
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/storage.cjs +0 -1
  30. package/dist/storage.cjs.map +1 -1
  31. package/dist/storage.d.cts +0 -1
  32. package/dist/storage.d.ts +0 -1
  33. package/dist/storage.mjs +0 -1
  34. package/dist/storage.mjs.map +1 -1
  35. package/package.json +2 -2
  36. package/src/_api/generated/_cfg_accounts/openapi.json +1 -28
  37. package/src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts +0 -1
  38. package/src/_api/generated/_cfg_accounts/schemas/OAuthTokenResponse.ts +0 -1
  39. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts +0 -1
  40. package/src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts +0 -1
  41. package/src/_api/generated/_cfg_accounts/schemas/PasswordLoginRequest.ts +0 -1
  42. package/src/_api/generated/_cfg_accounts/schemas/PasswordLoginResponse.ts +0 -1
  43. package/src/_api/generated/_cfg_totp/openapi.json +0 -5
  44. package/src/_api/generated/_cfg_totp/schemas/VerifyResponse.ts +0 -1
  45. package/src/_api/generated/helpers/auth.ts +1 -1
  46. package/src/_api/generated/helpers/keys.ts +0 -1
  47. package/src/_api/generated/openapi.json +1 -33
  48. package/src/_api/generated/types.gen.ts +4 -59
  49. package/src/auth/__tests__/passwordLogin.test.tsx +1 -3
  50. package/src/auth/context/AccountsContext.tsx +6 -8
  51. package/src/auth/context/AuthContext.tsx +1 -4
  52. package/src/auth/context/types.ts +1 -1
  53. package/src/auth/hooks/useAuthForm.ts +3 -5
  54. package/src/auth/hooks/useAuthFormState.ts +0 -4
  55. package/src/auth/hooks/useGithubAuth.ts +5 -12
  56. package/src/auth/hooks/useTwoFactorVerify.ts +2 -2
  57. package/src/auth/types/form.ts +0 -5
@@ -671,10 +671,6 @@ type OAuthCallbackRequestRequest = {
671
671
  * Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path
672
672
  */
673
673
  redirect_uri?: string;
674
- /**
675
- * Keep this browser signed in for 30 days
676
- */
677
- remember_me?: boolean;
678
674
  };
679
675
  /**
680
676
  * Serializer for OAuth connection info (user-facing).
@@ -798,10 +794,6 @@ type OAuthTokenResponse = {
798
794
  * True if user should be prompted to enable 2FA
799
795
  */
800
796
  should_prompt_2fa?: boolean;
801
- /**
802
- * Whether this login should persist across browser restarts
803
- */
804
- persistent_session?: boolean;
805
797
  };
806
798
  /**
807
799
  * Typed error response for OTP operations.
@@ -885,10 +877,6 @@ type OtpVerifyRequest = {
885
877
  * Source URL for tracking login (e.g., https://my.djangocfg.com)
886
878
  */
887
879
  source_url?: string;
888
- /**
889
- * Keep this browser signed in for 30 days
890
- */
891
- remember_me?: boolean;
892
880
  };
893
881
  /**
894
882
  * OTP verification response.
@@ -928,10 +916,6 @@ type OtpVerifyResponse = {
928
916
  * Whether user should be prompted to enable 2FA
929
917
  */
930
918
  should_prompt_2fa?: boolean;
931
- /**
932
- * Whether this login should persist across browser restarts
933
- */
934
- persistent_session?: boolean;
935
919
  };
936
920
  /**
937
921
  * Typed error response for password login.
@@ -955,6 +939,18 @@ type PasswordLoginError = {
955
939
  */
956
940
  retry_after?: number | null;
957
941
  };
942
+ /**
943
+ * Validate email+password against live accounts only.
944
+ *
945
+ * Subclasses SimpleJWT so the field/validation contract stays theirs, but
946
+ * replaces ``validate()`` — the token pair itself is minted by the view via
947
+ * ``mint_tokens_for_request`` so the DPoP binding and token
948
+ * lifetime match OTP, OAuth and TOTP exactly.
949
+ */
950
+ type PasswordLoginRequest = {
951
+ email: string;
952
+ password: string;
953
+ };
958
954
  /**
959
955
  * Password-login response.
960
956
  *
@@ -986,10 +982,6 @@ type PasswordLoginResponse = {
986
982
  * Whether user should be prompted to enable 2FA
987
983
  */
988
984
  should_prompt_2fa?: boolean;
989
- /**
990
- * Whether this login should persist across browser restarts
991
- */
992
- persistent_session?: boolean;
993
985
  };
994
986
  /**
995
987
  * Serializer for updating user profile.
@@ -1179,10 +1171,6 @@ type VerifyResponse = {
1179
1171
  * User profile data
1180
1172
  */
1181
1173
  user: TotpVerifyUser;
1182
- /**
1183
- * Whether this login should persist across browser restarts
1184
- */
1185
- persistent_session: boolean;
1186
1174
  /**
1187
1175
  * Number of remaining backup codes (if backup code was used)
1188
1176
  */
@@ -1323,22 +1311,6 @@ type CfgAccountsOauthDisconnectResponse200AutoRef = {
1323
1311
  * 2FA disabled successfully
1324
1312
  */
1325
1313
  type CfgTotpDisableResponse200AutoRef = unknown;
1326
- /**
1327
- * Validate email+password against live accounts only.
1328
- *
1329
- * Subclasses SimpleJWT so the field/validation contract stays theirs, but
1330
- * replaces ``validate()`` — the token pair itself is minted by the view via
1331
- * ``mint_tokens_for_request`` so the DPoP binding and remembered-session
1332
- * lifetime match OTP, OAuth and TOTP exactly.
1333
- */
1334
- type PasswordLoginRequestWritable = {
1335
- /**
1336
- * Keep this browser signed in for 30 days
1337
- */
1338
- remember_me?: boolean;
1339
- email: string;
1340
- password: string;
1341
- };
1342
1314
  type CfgAccountsApiKeyRetrieveData = {
1343
1315
  body?: never;
1344
1316
  path?: never;
@@ -1619,7 +1591,7 @@ type CfgAccountsProfileUpdateUpdateResponses = {
1619
1591
  200: User;
1620
1592
  };
1621
1593
  type CfgAccountsTokenCreateData = {
1622
- body: PasswordLoginRequestWritable;
1594
+ body: PasswordLoginRequest;
1623
1595
  path?: never;
1624
1596
  query?: never;
1625
1597
  url: '/cfg/accounts/token/';
package/dist/clients.d.ts CHANGED
@@ -671,10 +671,6 @@ type OAuthCallbackRequestRequest = {
671
671
  * Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path
672
672
  */
673
673
  redirect_uri?: string;
674
- /**
675
- * Keep this browser signed in for 30 days
676
- */
677
- remember_me?: boolean;
678
674
  };
679
675
  /**
680
676
  * Serializer for OAuth connection info (user-facing).
@@ -798,10 +794,6 @@ type OAuthTokenResponse = {
798
794
  * True if user should be prompted to enable 2FA
799
795
  */
800
796
  should_prompt_2fa?: boolean;
801
- /**
802
- * Whether this login should persist across browser restarts
803
- */
804
- persistent_session?: boolean;
805
797
  };
806
798
  /**
807
799
  * Typed error response for OTP operations.
@@ -885,10 +877,6 @@ type OtpVerifyRequest = {
885
877
  * Source URL for tracking login (e.g., https://my.djangocfg.com)
886
878
  */
887
879
  source_url?: string;
888
- /**
889
- * Keep this browser signed in for 30 days
890
- */
891
- remember_me?: boolean;
892
880
  };
893
881
  /**
894
882
  * OTP verification response.
@@ -928,10 +916,6 @@ type OtpVerifyResponse = {
928
916
  * Whether user should be prompted to enable 2FA
929
917
  */
930
918
  should_prompt_2fa?: boolean;
931
- /**
932
- * Whether this login should persist across browser restarts
933
- */
934
- persistent_session?: boolean;
935
919
  };
936
920
  /**
937
921
  * Typed error response for password login.
@@ -955,6 +939,18 @@ type PasswordLoginError = {
955
939
  */
956
940
  retry_after?: number | null;
957
941
  };
942
+ /**
943
+ * Validate email+password against live accounts only.
944
+ *
945
+ * Subclasses SimpleJWT so the field/validation contract stays theirs, but
946
+ * replaces ``validate()`` — the token pair itself is minted by the view via
947
+ * ``mint_tokens_for_request`` so the DPoP binding and token
948
+ * lifetime match OTP, OAuth and TOTP exactly.
949
+ */
950
+ type PasswordLoginRequest = {
951
+ email: string;
952
+ password: string;
953
+ };
958
954
  /**
959
955
  * Password-login response.
960
956
  *
@@ -986,10 +982,6 @@ type PasswordLoginResponse = {
986
982
  * Whether user should be prompted to enable 2FA
987
983
  */
988
984
  should_prompt_2fa?: boolean;
989
- /**
990
- * Whether this login should persist across browser restarts
991
- */
992
- persistent_session?: boolean;
993
985
  };
994
986
  /**
995
987
  * Serializer for updating user profile.
@@ -1179,10 +1171,6 @@ type VerifyResponse = {
1179
1171
  * User profile data
1180
1172
  */
1181
1173
  user: TotpVerifyUser;
1182
- /**
1183
- * Whether this login should persist across browser restarts
1184
- */
1185
- persistent_session: boolean;
1186
1174
  /**
1187
1175
  * Number of remaining backup codes (if backup code was used)
1188
1176
  */
@@ -1323,22 +1311,6 @@ type CfgAccountsOauthDisconnectResponse200AutoRef = {
1323
1311
  * 2FA disabled successfully
1324
1312
  */
1325
1313
  type CfgTotpDisableResponse200AutoRef = unknown;
1326
- /**
1327
- * Validate email+password against live accounts only.
1328
- *
1329
- * Subclasses SimpleJWT so the field/validation contract stays theirs, but
1330
- * replaces ``validate()`` — the token pair itself is minted by the view via
1331
- * ``mint_tokens_for_request`` so the DPoP binding and remembered-session
1332
- * lifetime match OTP, OAuth and TOTP exactly.
1333
- */
1334
- type PasswordLoginRequestWritable = {
1335
- /**
1336
- * Keep this browser signed in for 30 days
1337
- */
1338
- remember_me?: boolean;
1339
- email: string;
1340
- password: string;
1341
- };
1342
1314
  type CfgAccountsApiKeyRetrieveData = {
1343
1315
  body?: never;
1344
1316
  path?: never;
@@ -1619,7 +1591,7 @@ type CfgAccountsProfileUpdateUpdateResponses = {
1619
1591
  200: User;
1620
1592
  };
1621
1593
  type CfgAccountsTokenCreateData = {
1622
- body: PasswordLoginRequestWritable;
1594
+ body: PasswordLoginRequest;
1623
1595
  path?: never;
1624
1596
  query?: never;
1625
1597
  url: '/cfg/accounts/token/';
package/dist/clients.mjs CHANGED
@@ -79,7 +79,6 @@ var CFG_KEYS = {
79
79
  redirectUrlTs: k("cfg.auth.redirect_url_ts", "session", true),
80
80
  oauthState: k("cfg.auth.oauth_state", "session", true),
81
81
  oauthProvider: k("cfg.auth.oauth_provider", "session", true),
82
- oauthRememberMe: k("cfg.auth.oauth_remember_me", "session", true),
83
82
  profileCache: k("cfg.profile.cache", "local", true),
84
83
  monitorSessionId: k("cfg.monitor.session_id", "local", false),
85
84
  monitorSessionCookie: k("cfg.monitor.session_id", "cookie", false),