@rpcbase/auth 0.136.0 → 0.137.0

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 (85) hide show
  1. package/dist/api/me/handler.d.ts +5 -0
  2. package/dist/api/me/handler.d.ts.map +1 -0
  3. package/dist/api/me/index.d.ts +16 -0
  4. package/dist/api/me/index.d.ts.map +1 -0
  5. package/dist/api/request-password-reset/handler.d.ts +5 -0
  6. package/dist/api/request-password-reset/handler.d.ts.map +1 -0
  7. package/dist/api/request-password-reset/index.d.ts +12 -0
  8. package/dist/api/request-password-reset/index.d.ts.map +1 -0
  9. package/dist/api/resend-otp/handler.d.ts +5 -0
  10. package/dist/api/resend-otp/handler.d.ts.map +1 -0
  11. package/dist/api/resend-otp/index.d.ts +12 -0
  12. package/dist/api/resend-otp/index.d.ts.map +1 -0
  13. package/dist/api/set-active-account/handler.d.ts +5 -0
  14. package/dist/api/set-active-account/handler.d.ts.map +1 -0
  15. package/dist/api/set-active-account/index.d.ts +13 -0
  16. package/dist/api/set-active-account/index.d.ts.map +1 -0
  17. package/dist/api/set-new-password/handler.d.ts +5 -0
  18. package/dist/api/set-new-password/handler.d.ts.map +1 -0
  19. package/dist/api/set-new-password/index.d.ts +14 -0
  20. package/dist/api/set-new-password/index.d.ts.map +1 -0
  21. package/dist/api/sign-in/handler.d.ts +5 -0
  22. package/dist/api/sign-in/handler.d.ts.map +1 -0
  23. package/dist/api/sign-in/index.d.ts +16 -0
  24. package/dist/api/sign-in/index.d.ts.map +1 -0
  25. package/dist/api/sign-out/handler.d.ts +4 -0
  26. package/dist/api/sign-out/handler.d.ts.map +1 -0
  27. package/dist/api/sign-out/index.d.ts +9 -0
  28. package/dist/api/sign-out/index.d.ts.map +1 -0
  29. package/dist/api/sign-up/handler.d.ts +5 -0
  30. package/dist/api/sign-up/handler.d.ts.map +1 -0
  31. package/dist/api/sign-up/index.d.ts +16 -0
  32. package/dist/api/sign-up/index.d.ts.map +1 -0
  33. package/dist/api/verify-otp/handler.d.ts +5 -0
  34. package/dist/api/verify-otp/handler.d.ts.map +1 -0
  35. package/dist/api/verify-otp/index.d.ts +16 -0
  36. package/dist/api/verify-otp/index.d.ts.map +1 -0
  37. package/dist/api/verify-password-reset-otp/handler.d.ts +5 -0
  38. package/dist/api/verify-password-reset-otp/handler.d.ts.map +1 -0
  39. package/dist/api/verify-password-reset-otp/index.d.ts +14 -0
  40. package/dist/api/verify-password-reset-otp/index.d.ts.map +1 -0
  41. package/dist/components/AppleSignInButton/index.d.ts +5 -0
  42. package/dist/components/AppleSignInButton/index.d.ts.map +1 -0
  43. package/dist/components/AuthLayout/index.d.ts +6 -0
  44. package/dist/components/AuthLayout/index.d.ts.map +1 -0
  45. package/dist/components/EmailInput/index.d.ts +6 -0
  46. package/dist/components/EmailInput/index.d.ts.map +1 -0
  47. package/dist/components/PasswordInput/index.d.ts +10 -0
  48. package/dist/components/PasswordInput/index.d.ts.map +1 -0
  49. package/dist/components/RememberMeCheckbox/index.d.ts +6 -0
  50. package/dist/components/RememberMeCheckbox/index.d.ts.map +1 -0
  51. package/dist/components/ResendCodeButton/index.d.ts +14 -0
  52. package/dist/components/ResendCodeButton/index.d.ts.map +1 -0
  53. package/dist/components/SignInForm/index.d.ts +6 -0
  54. package/dist/components/SignInForm/index.d.ts.map +1 -0
  55. package/dist/components/SignUpForm/index.d.ts +7 -0
  56. package/dist/components/SignUpForm/index.d.ts.map +1 -0
  57. package/dist/components/index.d.ts +9 -0
  58. package/dist/components/index.d.ts.map +1 -0
  59. package/dist/index.d.ts +4 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/middleware.d.ts +6 -0
  62. package/dist/middleware.d.ts.map +1 -0
  63. package/dist/oauth/config.d.ts +11 -0
  64. package/dist/oauth/config.d.ts.map +1 -0
  65. package/dist/oauth/index.d.ts +5 -0
  66. package/dist/oauth/index.d.ts.map +1 -0
  67. package/dist/oauth/jwt.d.ts +2 -0
  68. package/dist/oauth/jwt.d.ts.map +1 -0
  69. package/dist/oauth/lib.d.ts +71 -0
  70. package/dist/oauth/lib.d.ts.map +1 -0
  71. package/dist/oauth/oidc.d.ts +9 -0
  72. package/dist/oauth/oidc.d.ts.map +1 -0
  73. package/dist/oauth/pkce.d.ts +6 -0
  74. package/dist/oauth/pkce.d.ts.map +1 -0
  75. package/dist/oauth/providerId.d.ts +2 -0
  76. package/dist/oauth/providerId.d.ts.map +1 -0
  77. package/dist/routes.d.ts +2 -0
  78. package/dist/routes.d.ts.map +1 -0
  79. package/dist/session.d.ts +13 -0
  80. package/dist/session.d.ts.map +1 -0
  81. package/dist/types.d.ts +8 -0
  82. package/dist/types.d.ts.map +1 -0
  83. package/dist/utils/sanitizeNextPath.d.ts +2 -0
  84. package/dist/utils/sanitizeNextPath.d.ts.map +1 -0
  85. package/package.json +12 -1
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/me/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAGnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA4DlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAGC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/me";
3
+ export declare const requestSchema: z.ZodObject<{}, z.core.$strip>;
4
+ export type RequestPayload = z.infer<typeof requestSchema>;
5
+ export declare const responseSchema: z.ZodObject<{
6
+ id: z.ZodOptional<z.ZodString>;
7
+ email: z.ZodOptional<z.ZodString>;
8
+ phone: z.ZodOptional<z.ZodString>;
9
+ name: z.ZodOptional<z.ZodString>;
10
+ tenants: z.ZodDefault<z.ZodArray<z.ZodString>>;
11
+ currentTenantId: z.ZodOptional<z.ZodString>;
12
+ signedInTenants: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
13
+ error: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export type ResponsePayload = z.infer<typeof responseSchema>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/me/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,oBAAoB,CAAA;AAEtC,eAAO,MAAM,aAAa,gCAAe,CAAA;AACzC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;iBASzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/request-password-reset/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA2ElC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/request-password-reset";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type RequestPayload = z.infer<typeof requestSchema>;
7
+ export declare const responseSchema: z.ZodObject<{
8
+ success: z.ZodBoolean;
9
+ error: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type ResponsePayload = z.infer<typeof responseSchema>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/request-password-reset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,wCAAwC,CAAA;AAE1D,eAAO,MAAM,aAAa;;iBAExB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/resend-otp/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBAqDlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/resend-otp";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type RequestPayload = z.infer<typeof requestSchema>;
7
+ export declare const responseSchema: z.ZodObject<{
8
+ success: z.ZodBoolean;
9
+ error: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type ResponsePayload = z.infer<typeof responseSchema>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/resend-otp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,4BAA4B,CAAA;AAE9C,eAAO,MAAM,aAAa;;iBAExB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/set-active-account/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBAqDlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAGC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/set-active-account";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ tenantId: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type RequestPayload = z.infer<typeof requestSchema>;
7
+ export declare const responseSchema: z.ZodObject<{
8
+ success: z.ZodBoolean;
9
+ error: z.ZodOptional<z.ZodString>;
10
+ tenantId: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ export type ResponsePayload = z.infer<typeof responseSchema>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/set-active-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,oCAAoC,CAAA;AAEtD,eAAO,MAAM,aAAa;;iBAExB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;iBAIzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/set-new-password/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA2ClC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/set-new-password";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ resetToken: z.ZodString;
6
+ password: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export type RequestPayload = z.infer<typeof requestSchema>;
9
+ export declare const responseSchema: z.ZodObject<{
10
+ success: z.ZodBoolean;
11
+ error: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ export type ResponsePayload = z.infer<typeof responseSchema>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/set-new-password/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,kCAAkC,CAAA;AAEpD,eAAO,MAAM,aAAa;;;;iBAIxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/sign-in/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAKnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA6DlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/sign-in";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ password: z.ZodString;
6
+ rememberMe: z.ZodDefault<z.ZodBoolean>;
7
+ }, z.core.$strip>;
8
+ export type RequestPayload = z.infer<typeof requestSchema>;
9
+ export declare const responseSchema: z.ZodObject<{
10
+ success: z.ZodBoolean;
11
+ error: z.ZodOptional<z.ZodString>;
12
+ userId: z.ZodOptional<z.ZodString>;
13
+ tenantId: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export type ResponsePayload = z.infer<typeof responseSchema>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/sign-in/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,yBAAyB,CAAA;AAE3C,eAAO,MAAM,aAAa;;;;iBAOxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { Api } from '@rpcbase/api';
2
+ declare const _default: (api: Api) => void;
3
+ export default _default;
4
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/sign-out/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,cAAc,CAAA;yBAkBvB,KAAK,GAAG;AAAxB,wBAEC"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/sign-out";
3
+ export declare const requestSchema: z.ZodObject<{}, z.core.$strip>;
4
+ export type RequestPayload = z.infer<typeof requestSchema>;
5
+ export declare const responseSchema: z.ZodObject<{
6
+ success: z.ZodBoolean;
7
+ }, z.core.$strip>;
8
+ export type ResponsePayload = z.infer<typeof responseSchema>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/sign-out/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,0BAA0B,CAAA;AAG5C,eAAO,MAAM,aAAa,gCAAe,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE3D,eAAO,MAAM,cAAc;;iBAEzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/sign-up/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBAiFlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/sign-up";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ password: z.ZodString;
6
+ rememberMe: z.ZodDefault<z.ZodBoolean>;
7
+ }, z.core.$strip>;
8
+ export type RequestPayload = z.infer<typeof requestSchema>;
9
+ export declare const responseSchema: z.ZodObject<{
10
+ success: z.ZodBoolean;
11
+ error: z.ZodOptional<z.ZodString>;
12
+ userId: z.ZodOptional<z.ZodString>;
13
+ tenantId: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export type ResponsePayload = z.infer<typeof responseSchema>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/sign-up/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,yBAAyB,CAAA;AAE3C,eAAO,MAAM,aAAa;;;;iBAQtB,CAAA;AAEJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/verify-otp/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAInD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA+DlC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/verify-otp";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ code: z.ZodString;
6
+ rememberMe: z.ZodDefault<z.ZodBoolean>;
7
+ }, z.core.$strip>;
8
+ export type RequestPayload = z.infer<typeof requestSchema>;
9
+ export declare const responseSchema: z.ZodObject<{
10
+ success: z.ZodBoolean;
11
+ error: z.ZodOptional<z.ZodString>;
12
+ userId: z.ZodOptional<z.ZodString>;
13
+ tenantId: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export type ResponsePayload = z.infer<typeof responseSchema>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/verify-otp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,4BAA4B,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;iBAIxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Api } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../../types';
3
+ declare const _default: (api: Api<AuthSessionUser>) => void;
4
+ export default _default;
5
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/api/verify-password-reset-otp/handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAA;AAGnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;yBA6ClC,KAAK,GAAG,CAAC,eAAe,CAAC;AAAzC,wBAEC"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const Route = "/api/rb/auth/verify-password-reset-otp";
3
+ export declare const requestSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ code: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type RequestPayload = z.infer<typeof requestSchema>;
8
+ export declare const responseSchema: z.ZodObject<{
9
+ success: z.ZodBoolean;
10
+ error: z.ZodOptional<z.ZodString>;
11
+ resetToken: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ export type ResponsePayload = z.infer<typeof responseSchema>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/verify-password-reset-otp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,KAAK,2CAA2C,CAAA;AAE7D,eAAO,MAAM,aAAa;;;iBAGxB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAE1D,eAAO,MAAM,cAAc;;;;iBAIzB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare const AppleSignInButton: ({ onPress, className, }: {
2
+ onPress: () => void;
3
+ className?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppleSignInButton/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,GAAI,yBAG/B;IACD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CA2BA,CAAA"}
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export declare const AuthLayout: ({ sidePanel, children, }: {
3
+ sidePanel: React.ReactElement | null;
4
+ children: React.ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AuthLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,eAAO,MAAM,UAAU,GAAI,0BAGxB;IACD,SAAS,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,4CAyBA,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const EmailInput: ({ id, className, placeholder, }: {
2
+ id: string;
3
+ className?: string;
4
+ placeholder?: string;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmailInput/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,iCAIxB;IACD,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,4CA2BA,CAAA"}
@@ -0,0 +1,10 @@
1
+ type PasswordInputProps = {
2
+ id: string;
3
+ name?: string;
4
+ className?: string;
5
+ placeholder?: string;
6
+ autoComplete?: string;
7
+ };
8
+ export declare const PasswordInput: ({ id, name, className, placeholder, autoComplete, }: PasswordInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordInput/index.tsx"],"names":[],"mappings":"AAKA,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,qDAM3B,kBAAkB,4CA2CpB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { ElementType } from 'react';
2
+ export declare const RememberMeCheckbox: ({ label, as: Component }: {
3
+ label: string;
4
+ as?: ElementType;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RememberMeCheckbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAIxC,eAAO,MAAM,kBAAkB,GAAI,0BAGhC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,4CAiBA,CAAA"}
@@ -0,0 +1,14 @@
1
+ export declare const useResendCountdown: (seconds?: number) => {
2
+ remaining: number;
3
+ formatted: string;
4
+ isCountingDown: boolean;
5
+ canResend: boolean;
6
+ restart: (nextSeconds?: number) => void;
7
+ };
8
+ export declare const ResendCodeButton: ({ seconds, onResend, className, disabled, }: {
9
+ seconds?: number;
10
+ onResend?: () => Promise<void> | void;
11
+ className?: string;
12
+ disabled?: boolean;
13
+ }) => import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ResendCodeButton/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,GAAI,gBAAY;;;;;4BAoBF,MAAM;CAelD,CAAA;AAGD,eAAO,MAAM,gBAAgB,GAAI,6CAK9B;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,4CA8CA,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const SignInForm: ({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SignInForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYjC,eAAO,MAAM,UAAU,GAAI,yBAGxB;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,4CAwDA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const SignUpForm: ({ children, className, otpNextPath }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ otpNextPath?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SignUpForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAW,MAAM,OAAO,CAAA;AAYzC,eAAO,MAAM,UAAU,GAAI,sCAIxB;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,4CAwEA,CAAA"}
@@ -0,0 +1,9 @@
1
+ export * from './AuthLayout';
2
+ export * from './AppleSignInButton';
3
+ export * from './EmailInput';
4
+ export * from './SignInForm';
5
+ export * from './SignUpForm';
6
+ export * from './RememberMeCheckbox';
7
+ export * from './PasswordInput';
8
+ export * from './ResendCodeButton';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './middleware';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Middleware } from '@rpcbase/api';
2
+ import { AuthSessionUser } from './types';
3
+ export declare const restrictSessionMiddleware: Middleware<AuthSessionUser>;
4
+ export declare const requireSession: Middleware<AuthSessionUser>;
5
+ export declare const redirectAuthMiddleware: Middleware<AuthSessionUser>;
6
+ //# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAQ9C,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,eAAe,CAMjE,CAAA;AAED,eAAO,MAAM,cAAc,6BAA4B,CAAA;AAEvD,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,eAAe,CAM9D,CAAA"}
@@ -0,0 +1,11 @@
1
+ export type OAuthProviderConfig = {
2
+ issuer: string;
3
+ clientId: string;
4
+ clientSecret?: string;
5
+ scope: string;
6
+ callbackPath: string;
7
+ };
8
+ export declare const configureOAuthProviders: (providers: Record<string, OAuthProviderConfig>) => void;
9
+ export declare const setOAuthProviders: (providers: Record<string, OAuthProviderConfig>) => void;
10
+ export declare const getOAuthProviderConfig: (providerId: string) => OAuthProviderConfig | null;
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/oauth/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAiED,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,SAIrF,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,SAG/E,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,KAAG,mBAAmB,GAAG,IAGjF,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { configureOAuthProviders, setOAuthProviders } from './config';
2
+ export type { OAuthProviderConfig } from './config';
3
+ export { createAppleClientSecret, createOAuthCallbackHandler, createOAuthStartHandler, getOAuthStartRedirectUrl, processOAuthCallback, } from './lib';
4
+ export type { OAuthCallbackResult, OAuthStartResult } from './lib';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/oauth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACrE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,OAAO,CAAA;AACd,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const decodeJwtPayload: <T = Record<string, unknown>>(token: string) => T | null;
2
+ //# sourceMappingURL=jwt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../src/oauth/jwt.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,GAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,KAAG,CAAC,GAAG,IAYjF,CAAA"}
@@ -0,0 +1,71 @@
1
+ import { ApiHandler, Ctx } from '@rpcbase/api';
2
+ import { AuthSessionUser } from '../types';
3
+ type OAuthCtx = Ctx<AuthSessionUser>;
4
+ export type OAuthStartResult = {
5
+ success: true;
6
+ redirectUrl: string;
7
+ } | {
8
+ success: false;
9
+ error: string;
10
+ statusCode: number;
11
+ };
12
+ export declare const getOAuthStartRedirectUrl: ({ ctx, providerId: providerIdOverride, returnTo, authorizationParams, }: {
13
+ ctx: OAuthCtx;
14
+ providerId?: string;
15
+ returnTo?: string | null;
16
+ authorizationParams?: Record<string, string>;
17
+ }) => Promise<OAuthStartResult>;
18
+ export type OAuthCallbackResult = {
19
+ success: true;
20
+ type: "signed_in";
21
+ redirectPath: string;
22
+ userId: string;
23
+ tenantId: string;
24
+ signedInTenants: string[];
25
+ } | {
26
+ success: false;
27
+ type: "missing_user";
28
+ providerId: string;
29
+ subject: string;
30
+ email?: string;
31
+ name?: string;
32
+ redirectPath?: string;
33
+ } | {
34
+ success: false;
35
+ type: "error";
36
+ error: string;
37
+ redirectPath: string;
38
+ };
39
+ export declare const processOAuthCallback: ({ ctx, providerId: providerIdOverride, createUserOnFirstSignIn, missingUserRedirectPath, successRedirectPath, }: {
40
+ ctx: OAuthCtx;
41
+ providerId?: string;
42
+ createUserOnFirstSignIn?: boolean;
43
+ missingUserRedirectPath?: string;
44
+ successRedirectPath?: string;
45
+ }) => Promise<OAuthCallbackResult>;
46
+ export declare const createOAuthStartHandler: ({ providerId, getAuthorizationParams, }?: {
47
+ providerId?: string;
48
+ getAuthorizationParams?: (providerId: string) => Record<string, string> | undefined;
49
+ }) => ApiHandler<unknown, {
50
+ success: boolean;
51
+ error?: string;
52
+ }, AuthSessionUser>;
53
+ export declare const createOAuthCallbackHandler: ({ providerId, createUserOnFirstSignIn, missingUserRedirectPath, successRedirectPath, }?: {
54
+ providerId?: string;
55
+ createUserOnFirstSignIn?: boolean;
56
+ missingUserRedirectPath?: string;
57
+ successRedirectPath?: string;
58
+ }) => ApiHandler<unknown, {
59
+ success: boolean;
60
+ error?: string;
61
+ }, AuthSessionUser>;
62
+ export declare const createAppleClientSecret: ({ teamId, clientId, keyId, privateKeyPem, now, expiresInSeconds, }: {
63
+ teamId: string;
64
+ clientId: string;
65
+ keyId: string;
66
+ privateKeyPem: string;
67
+ now?: Date;
68
+ expiresInSeconds?: number;
69
+ }) => string;
70
+ export {};
71
+ //# sourceMappingURL=lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/oauth/lib.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ export type OidcWellKnown = {
2
+ issuer: string;
3
+ authorization_endpoint: string;
4
+ token_endpoint: string;
5
+ userinfo_endpoint?: string;
6
+ jwks_uri?: string;
7
+ };
8
+ export declare const getOidcWellKnown: (issuerRaw: string) => Promise<OidcWellKnown>;
9
+ //# sourceMappingURL=oidc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oidc.d.ts","sourceRoot":"","sources":["../../src/oauth/oidc.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,sBAAsB,EAAE,MAAM,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAMD,eAAO,MAAM,gBAAgB,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,aAAa,CAuD/E,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const base64UrlEncode: (input: Buffer) => string;
2
+ export declare const generatePkcePair: () => {
3
+ verifier: string;
4
+ challenge: string;
5
+ };
6
+ //# sourceMappingURL=pkce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pkce.d.ts","sourceRoot":"","sources":["../../src/oauth/pkce.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAIvB,CAAA;AAEtB,eAAO,MAAM,gBAAgB;;;CAK5B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const isSafeOAuthProviderId: (value: string) => boolean;
2
+ //# sourceMappingURL=providerId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providerId.d.ts","sourceRoot":"","sources":["../../src/oauth/providerId.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,YAMlD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const routes: Record<string, unknown>;
2
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,yBAMb,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { Ctx } from '@rpcbase/api';
2
+ import { AuthSessionUser } from './types';
3
+ export declare const AUTHENTICATED_USER_ID_HEADER = "rb-authenticated-user-id";
4
+ export declare const AUTHENTICATED_TENANT_ID_HEADER = "rb-authenticated-tenant-id";
5
+ type CompleteAuthSignInArgs = {
6
+ userId: string;
7
+ currentTenantId: string;
8
+ signedInTenants: string[];
9
+ tenantRoles?: Record<string, string[]>;
10
+ };
11
+ export declare const completeAuthSignIn: (ctx: Ctx<AuthSessionUser>, args: CompleteAuthSignInArgs) => boolean;
12
+ export {};
13
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C,eAAO,MAAM,4BAA4B,6BAA6B,CAAA;AACtE,eAAO,MAAM,8BAA8B,+BAA+B,CAAA;AAE1E,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,KAAK,GAAG,CAAC,eAAe,CAAC,EACzB,MAAM,sBAAsB,KAC3B,OAeF,CAAA"}
@@ -0,0 +1,8 @@
1
+ export type AuthSessionUser = {
2
+ id: string;
3
+ currentTenantId: string;
4
+ signedInTenants: string[];
5
+ isEntryGateAuthorized: boolean;
6
+ tenantRoles?: Record<string, string[]>;
7
+ };
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CACvC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const sanitizeNextPath: (raw: string | null) => string | null;
2
+ //# sourceMappingURL=sanitizeNextPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitizeNextPath.d.ts","sourceRoot":"","sources":["../../src/utils/sanitizeNextPath.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,GAAG,IAAI,kBAwBlD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/auth",
3
- "version": "0.136.0",
3
+ "version": "0.137.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -33,6 +33,13 @@
33
33
  "wireit": {
34
34
  "build": {
35
35
  "command": "../../node_modules/.bin/vite build",
36
+ "dependencies": [
37
+ "../api:build",
38
+ "../db:build",
39
+ "../form:build",
40
+ "../router:build",
41
+ "../server:build"
42
+ ],
36
43
  "files": [
37
44
  "src/**/*",
38
45
  "../../tsconfig.json",
@@ -74,7 +81,11 @@
74
81
  }
75
82
  },
76
83
  "peerDependencies": {
84
+ "@rpcbase/api": "*",
85
+ "@rpcbase/db": "*",
77
86
  "@rpcbase/form": "*",
87
+ "@rpcbase/router": "*",
88
+ "@rpcbase/server": "*",
78
89
  "clsx": "*"
79
90
  },
80
91
  "devDependencies": {}