@workos/mcp-docs-server 0.1.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 (455) hide show
  1. package/.docs/organized/changelogs/workos-platform.json +277 -0
  2. package/.docs/organized/docs/admin-portal/_navigation.mdx +16 -0
  3. package/.docs/organized/docs/admin-portal/custom-branding.mdx +111 -0
  4. package/.docs/organized/docs/admin-portal/example-apps.mdx +46 -0
  5. package/.docs/organized/docs/admin-portal/index.mdx +240 -0
  6. package/.docs/organized/docs/audit-logs/_navigation.mdx +22 -0
  7. package/.docs/organized/docs/audit-logs/admin-portal.mdx +20 -0
  8. package/.docs/organized/docs/audit-logs/editing-events.mdx +27 -0
  9. package/.docs/organized/docs/audit-logs/exporting-events.mdx +29 -0
  10. package/.docs/organized/docs/audit-logs/index.mdx +110 -0
  11. package/.docs/organized/docs/audit-logs/log-streams.mdx +56 -0
  12. package/.docs/organized/docs/audit-logs/metadata-schema.mdx +21 -0
  13. package/.docs/organized/docs/custom-domains/_navigation.mdx +16 -0
  14. package/.docs/organized/docs/custom-domains/admin-portal.mdx +38 -0
  15. package/.docs/organized/docs/custom-domains/auth-api.mdx +59 -0
  16. package/.docs/organized/docs/custom-domains/authkit.mdx +36 -0
  17. package/.docs/organized/docs/custom-domains/email.mdx +41 -0
  18. package/.docs/organized/docs/custom-domains/index.mdx +19 -0
  19. package/.docs/organized/docs/dashboard.mdx +244 -0
  20. package/.docs/organized/docs/demo/_navigation.mdx +26 -0
  21. package/.docs/organized/docs/demo/accordion.mdx +34 -0
  22. package/.docs/organized/docs/demo/checklist.mdx +33 -0
  23. package/.docs/organized/docs/demo/code-block.mdx +185 -0
  24. package/.docs/organized/docs/demo/definition-list.mdx +35 -0
  25. package/.docs/organized/docs/demo/index.mdx +7 -0
  26. package/.docs/organized/docs/demo/punctuation.mdx +37 -0
  27. package/.docs/organized/docs/demo/replacements.mdx +26 -0
  28. package/.docs/organized/docs/demo/table.mdx +26 -0
  29. package/.docs/organized/docs/demo/tabs.mdx +17 -0
  30. package/.docs/organized/docs/directory-sync/_navigation.mdx +28 -0
  31. package/.docs/organized/docs/directory-sync/attributes.mdx +209 -0
  32. package/.docs/organized/docs/directory-sync/example-apps.mdx +46 -0
  33. package/.docs/organized/docs/directory-sync/handle-inactive-users.mdx +52 -0
  34. package/.docs/organized/docs/directory-sync/identity-provider-role-assignment.mdx +134 -0
  35. package/.docs/organized/docs/directory-sync/index.mdx +107 -0
  36. package/.docs/organized/docs/directory-sync/quick-start.mdx +129 -0
  37. package/.docs/organized/docs/directory-sync/understanding-events.mdx +209 -0
  38. package/.docs/organized/docs/domain-verification/_navigation.mdx +10 -0
  39. package/.docs/organized/docs/domain-verification/api.mdx +60 -0
  40. package/.docs/organized/docs/domain-verification/index.mdx +67 -0
  41. package/.docs/organized/docs/email.mdx +109 -0
  42. package/.docs/organized/docs/events/_navigation.mdx +22 -0
  43. package/.docs/organized/docs/events/data-syncing/data-reconciliation.mdx +56 -0
  44. package/.docs/organized/docs/events/data-syncing/events-api.mdx +114 -0
  45. package/.docs/organized/docs/events/data-syncing/index.mdx +66 -0
  46. package/.docs/organized/docs/events/data-syncing/webhooks.mdx +173 -0
  47. package/.docs/organized/docs/events/index.mdx +783 -0
  48. package/.docs/organized/docs/events/observability/datadog.mdx +76 -0
  49. package/.docs/organized/docs/fga/_navigation.mdx +64 -0
  50. package/.docs/organized/docs/fga/identity-provider-sessions.mdx +68 -0
  51. package/.docs/organized/docs/fga/index.mdx +60 -0
  52. package/.docs/organized/docs/fga/local-development.mdx +155 -0
  53. package/.docs/organized/docs/fga/modeling/abac.mdx +107 -0
  54. package/.docs/organized/docs/fga/modeling/blocklist.mdx +84 -0
  55. package/.docs/organized/docs/fga/modeling/conditional-roles.mdx +99 -0
  56. package/.docs/organized/docs/fga/modeling/custom-roles.mdx +90 -0
  57. package/.docs/organized/docs/fga/modeling/entitlements.mdx +127 -0
  58. package/.docs/organized/docs/fga/modeling/managed-service-provider.mdx +131 -0
  59. package/.docs/organized/docs/fga/modeling/org-roles-and-permissions.mdx +95 -0
  60. package/.docs/organized/docs/fga/modeling/policy-context.mdx +231 -0
  61. package/.docs/organized/docs/fga/modeling/public-access.mdx +61 -0
  62. package/.docs/organized/docs/fga/modeling/shareable-content.mdx +106 -0
  63. package/.docs/organized/docs/fga/modeling/superusers.mdx +74 -0
  64. package/.docs/organized/docs/fga/modeling/user-groups.mdx +92 -0
  65. package/.docs/organized/docs/fga/operations-usage.mdx +104 -0
  66. package/.docs/organized/docs/fga/playground.mdx +12 -0
  67. package/.docs/organized/docs/fga/policies.mdx +462 -0
  68. package/.docs/organized/docs/fga/query-language.mdx +112 -0
  69. package/.docs/organized/docs/fga/quick-start.mdx +174 -0
  70. package/.docs/organized/docs/fga/resources.mdx +92 -0
  71. package/.docs/organized/docs/fga/schema-management.mdx +224 -0
  72. package/.docs/organized/docs/fga/schema.mdx +388 -0
  73. package/.docs/organized/docs/fga/warrant-tokens.mdx +44 -0
  74. package/.docs/organized/docs/fga/warrants.mdx +92 -0
  75. package/.docs/organized/docs/glossary.mdx +184 -0
  76. package/.docs/organized/docs/integrations/_navigation.mdx +6 -0
  77. package/.docs/organized/docs/integrations/access-people-hr.mdx +87 -0
  78. package/.docs/organized/docs/integrations/adp-oidc.mdx +103 -0
  79. package/.docs/organized/docs/integrations/apple.mdx +169 -0
  80. package/.docs/organized/docs/integrations/auth0-directory-sync.mdx +78 -0
  81. package/.docs/organized/docs/integrations/auth0-enterprise-connection.mdx +92 -0
  82. package/.docs/organized/docs/integrations/auth0-saml.mdx +81 -0
  83. package/.docs/organized/docs/integrations/aws-cognito.mdx +81 -0
  84. package/.docs/organized/docs/integrations/bamboohr.mdx +90 -0
  85. package/.docs/organized/docs/integrations/breathe-hr.mdx +89 -0
  86. package/.docs/organized/docs/integrations/bubble.mdx +129 -0
  87. package/.docs/organized/docs/integrations/cas-saml.mdx +65 -0
  88. package/.docs/organized/docs/integrations/cezanne.mdx +74 -0
  89. package/.docs/organized/docs/integrations/classlink-saml.mdx +100 -0
  90. package/.docs/organized/docs/integrations/cloudflare-saml.mdx +164 -0
  91. package/.docs/organized/docs/integrations/cyberark-saml.mdx +138 -0
  92. package/.docs/organized/docs/integrations/cyberark-scim.mdx +100 -0
  93. package/.docs/organized/docs/integrations/duo-saml.mdx +127 -0
  94. package/.docs/organized/docs/integrations/entra-id-saml.mdx +156 -0
  95. package/.docs/organized/docs/integrations/entra-id-scim.mdx +218 -0
  96. package/.docs/organized/docs/integrations/firebase.mdx +98 -0
  97. package/.docs/organized/docs/integrations/fourth.mdx +66 -0
  98. package/.docs/organized/docs/integrations/github-oauth.mdx +85 -0
  99. package/.docs/organized/docs/integrations/gitlab-oauth.mdx +81 -0
  100. package/.docs/organized/docs/integrations/google-directory-sync.mdx +86 -0
  101. package/.docs/organized/docs/integrations/google-oauth.mdx +173 -0
  102. package/.docs/organized/docs/integrations/google-saml.mdx +135 -0
  103. package/.docs/organized/docs/integrations/hibob.mdx +98 -0
  104. package/.docs/organized/docs/integrations/jumpcloud-saml.mdx +96 -0
  105. package/.docs/organized/docs/integrations/jumpcloud-scim.mdx +106 -0
  106. package/.docs/organized/docs/integrations/keycloak-saml.mdx +128 -0
  107. package/.docs/organized/docs/integrations/lastpass-saml.mdx +134 -0
  108. package/.docs/organized/docs/integrations/linkedin-oauth.mdx +77 -0
  109. package/.docs/organized/docs/integrations/login-gov-oidc.mdx +103 -0
  110. package/.docs/organized/docs/integrations/microsoft-ad-fs-saml.mdx +96 -0
  111. package/.docs/organized/docs/integrations/microsoft-oauth.mdx +101 -0
  112. package/.docs/organized/docs/integrations/miniorange-saml.mdx +124 -0
  113. package/.docs/organized/docs/integrations/net-iq-saml.mdx +75 -0
  114. package/.docs/organized/docs/integrations/next-auth.mdx +257 -0
  115. package/.docs/organized/docs/integrations/oidc.mdx +64 -0
  116. package/.docs/organized/docs/integrations/okta-saml.mdx +144 -0
  117. package/.docs/organized/docs/integrations/okta-scim.mdx +210 -0
  118. package/.docs/organized/docs/integrations/onelogin-saml.mdx +131 -0
  119. package/.docs/organized/docs/integrations/onelogin-scim.mdx +150 -0
  120. package/.docs/organized/docs/integrations/oracle-saml.mdx +76 -0
  121. package/.docs/organized/docs/integrations/pingfederate-saml.mdx +103 -0
  122. package/.docs/organized/docs/integrations/pingfederate-scim.mdx +150 -0
  123. package/.docs/organized/docs/integrations/pingone-saml.mdx +86 -0
  124. package/.docs/organized/docs/integrations/react-native-expo.mdx +93 -0
  125. package/.docs/organized/docs/integrations/rippling-saml.mdx +174 -0
  126. package/.docs/organized/docs/integrations/rippling-scim.mdx +148 -0
  127. package/.docs/organized/docs/integrations/salesforce-saml.mdx +143 -0
  128. package/.docs/organized/docs/integrations/saml.mdx +64 -0
  129. package/.docs/organized/docs/integrations/scim.mdx +64 -0
  130. package/.docs/organized/docs/integrations/sftp.mdx +150 -0
  131. package/.docs/organized/docs/integrations/shibboleth-generic-saml.mdx +84 -0
  132. package/.docs/organized/docs/integrations/shibboleth-unsolicited-saml.mdx +84 -0
  133. package/.docs/organized/docs/integrations/simple-saml-php.mdx +78 -0
  134. package/.docs/organized/docs/integrations/slack-oauth.mdx +102 -0
  135. package/.docs/organized/docs/integrations/supabase.mdx +68 -0
  136. package/.docs/organized/docs/integrations/vmware-saml.mdx +100 -0
  137. package/.docs/organized/docs/integrations/workday.mdx +156 -0
  138. package/.docs/organized/docs/integrations/xero-oauth.mdx +83 -0
  139. package/.docs/organized/docs/magic-link/_navigation.mdx +16 -0
  140. package/.docs/organized/docs/magic-link/example-apps.mdx +46 -0
  141. package/.docs/organized/docs/magic-link/index.mdx +199 -0
  142. package/.docs/organized/docs/magic-link/launch-checklist.mdx +27 -0
  143. package/.docs/organized/docs/mfa/_navigation.mdx +18 -0
  144. package/.docs/organized/docs/mfa/example-apps.mdx +46 -0
  145. package/.docs/organized/docs/mfa/index.mdx +140 -0
  146. package/.docs/organized/docs/mfa/ux/enrollment.mdx +74 -0
  147. package/.docs/organized/docs/mfa/ux/sign-in.mdx +30 -0
  148. package/.docs/organized/docs/migrate/_navigation.mdx +6 -0
  149. package/.docs/organized/docs/migrate/auth0.mdx +98 -0
  150. package/.docs/organized/docs/migrate/aws-cognito.mdx +115 -0
  151. package/.docs/organized/docs/migrate/clerk.mdx +106 -0
  152. package/.docs/organized/docs/migrate/firebase.mdx +80 -0
  153. package/.docs/organized/docs/migrate/other-services.mdx +179 -0
  154. package/.docs/organized/docs/migrate/standalone-sso.mdx +105 -0
  155. package/.docs/organized/docs/on-prem-deployment.mdx +119 -0
  156. package/.docs/organized/docs/postman.mdx +90 -0
  157. package/.docs/organized/docs/reference/_navigation.mdx +527 -0
  158. package/.docs/organized/docs/reference/admin-portal/index.mdx +6 -0
  159. package/.docs/organized/docs/reference/admin-portal/portal-link/generate.mdx +268 -0
  160. package/.docs/organized/docs/reference/admin-portal/portal-link/index.mdx +15 -0
  161. package/.docs/organized/docs/reference/admin-portal/provider-icons/index.mdx +52 -0
  162. package/.docs/organized/docs/reference/api-keys.mdx +22 -0
  163. package/.docs/organized/docs/reference/audit-logs/audit-log-export.mdx +239 -0
  164. package/.docs/organized/docs/reference/audit-logs/audit-log-schema.mdx +69 -0
  165. package/.docs/organized/docs/reference/audit-logs/create-event.mdx +673 -0
  166. package/.docs/organized/docs/reference/audit-logs/create-export.mdx +308 -0
  167. package/.docs/organized/docs/reference/audit-logs/create-schema.mdx +95 -0
  168. package/.docs/organized/docs/reference/audit-logs/get-export.mdx +117 -0
  169. package/.docs/organized/docs/reference/audit-logs/get-retention.mdx +34 -0
  170. package/.docs/organized/docs/reference/audit-logs/index.mdx +6 -0
  171. package/.docs/organized/docs/reference/audit-logs/list-actions.mdx +40 -0
  172. package/.docs/organized/docs/reference/audit-logs/list-schemas.mdx +40 -0
  173. package/.docs/organized/docs/reference/audit-logs/set-retention.mdx +39 -0
  174. package/.docs/organized/docs/reference/client-libraries.mdx +19 -0
  175. package/.docs/organized/docs/reference/directory-sync/directory/delete.mdx +90 -0
  176. package/.docs/organized/docs/reference/directory-sync/directory/get.mdx +105 -0
  177. package/.docs/organized/docs/reference/directory-sync/directory/index.mdx +385 -0
  178. package/.docs/organized/docs/reference/directory-sync/directory/list.mdx +281 -0
  179. package/.docs/organized/docs/reference/directory-sync/directory-group/get.mdx +105 -0
  180. package/.docs/organized/docs/reference/directory-sync/directory-group/index.mdx +277 -0
  181. package/.docs/organized/docs/reference/directory-sync/directory-group/list.mdx +295 -0
  182. package/.docs/organized/docs/reference/directory-sync/directory-user/get.mdx +112 -0
  183. package/.docs/organized/docs/reference/directory-sync/directory-user/index.mdx +470 -0
  184. package/.docs/organized/docs/reference/directory-sync/directory-user/list.mdx +304 -0
  185. package/.docs/organized/docs/reference/directory-sync/index.mdx +10 -0
  186. package/.docs/organized/docs/reference/domain-verification/create.mdx +38 -0
  187. package/.docs/organized/docs/reference/domain-verification/get.mdx +32 -0
  188. package/.docs/organized/docs/reference/domain-verification/index.mdx +84 -0
  189. package/.docs/organized/docs/reference/domain-verification/verify.mdx +36 -0
  190. package/.docs/organized/docs/reference/errors.mdx +30 -0
  191. package/.docs/organized/docs/reference/events/index.mdx +9 -0
  192. package/.docs/organized/docs/reference/events/list.mdx +246 -0
  193. package/.docs/organized/docs/reference/fga/batch-check.mdx +277 -0
  194. package/.docs/organized/docs/reference/fga/check.mdx +563 -0
  195. package/.docs/organized/docs/reference/fga/index.mdx +6 -0
  196. package/.docs/organized/docs/reference/fga/policy/create.mdx +27 -0
  197. package/.docs/organized/docs/reference/fga/policy/delete.mdx +18 -0
  198. package/.docs/organized/docs/reference/fga/policy/get.mdx +23 -0
  199. package/.docs/organized/docs/reference/fga/policy/index.mdx +52 -0
  200. package/.docs/organized/docs/reference/fga/policy/list.mdx +41 -0
  201. package/.docs/organized/docs/reference/fga/policy/update.mdx +26 -0
  202. package/.docs/organized/docs/reference/fga/query.mdx +375 -0
  203. package/.docs/organized/docs/reference/fga/resource/batch-write.mdx +175 -0
  204. package/.docs/organized/docs/reference/fga/resource/create.mdx +130 -0
  205. package/.docs/organized/docs/reference/fga/resource/delete.mdx +86 -0
  206. package/.docs/organized/docs/reference/fga/resource/get.mdx +88 -0
  207. package/.docs/organized/docs/reference/fga/resource/index.mdx +98 -0
  208. package/.docs/organized/docs/reference/fga/resource/list.mdx +188 -0
  209. package/.docs/organized/docs/reference/fga/resource/update.mdx +115 -0
  210. package/.docs/organized/docs/reference/fga/resource-type/apply.mdx +35 -0
  211. package/.docs/organized/docs/reference/fga/resource-type/create.mdx +24 -0
  212. package/.docs/organized/docs/reference/fga/resource-type/delete.mdx +22 -0
  213. package/.docs/organized/docs/reference/fga/resource-type/get.mdx +23 -0
  214. package/.docs/organized/docs/reference/fga/resource-type/index.mdx +68 -0
  215. package/.docs/organized/docs/reference/fga/resource-type/list.mdx +36 -0
  216. package/.docs/organized/docs/reference/fga/resource-type/update.mdx +23 -0
  217. package/.docs/organized/docs/reference/fga/schema/apply.mdx +42 -0
  218. package/.docs/organized/docs/reference/fga/schema/get.mdx +24 -0
  219. package/.docs/organized/docs/reference/fga/schema/index.mdx +39 -0
  220. package/.docs/organized/docs/reference/fga/warrant/batch-write.mdx +226 -0
  221. package/.docs/organized/docs/reference/fga/warrant/create.mdx +215 -0
  222. package/.docs/organized/docs/reference/fga/warrant/delete.mdx +212 -0
  223. package/.docs/organized/docs/reference/fga/warrant/index.mdx +186 -0
  224. package/.docs/organized/docs/reference/fga/warrant/list.mdx +282 -0
  225. package/.docs/organized/docs/reference/idempotency.mdx +21 -0
  226. package/.docs/organized/docs/reference/index.mdx +194 -0
  227. package/.docs/organized/docs/reference/magic-link/index.mdx +8 -0
  228. package/.docs/organized/docs/reference/magic-link/passwordless-session/create.mdx +268 -0
  229. package/.docs/organized/docs/reference/magic-link/passwordless-session/index.mdx +203 -0
  230. package/.docs/organized/docs/reference/magic-link/passwordless-session/send-email.mdx +158 -0
  231. package/.docs/organized/docs/reference/mfa/authentication-challenge.mdx +217 -0
  232. package/.docs/organized/docs/reference/mfa/authentication-factor.mdx +381 -0
  233. package/.docs/organized/docs/reference/mfa/challenge-factor.mdx +170 -0
  234. package/.docs/organized/docs/reference/mfa/delete-factor.mdx +93 -0
  235. package/.docs/organized/docs/reference/mfa/enroll-factor.mdx +241 -0
  236. package/.docs/organized/docs/reference/mfa/get-factor.mdx +108 -0
  237. package/.docs/organized/docs/reference/mfa/index.mdx +8 -0
  238. package/.docs/organized/docs/reference/mfa/verify-challenge.mdx +228 -0
  239. package/.docs/organized/docs/reference/organization/create.mdx +216 -0
  240. package/.docs/organized/docs/reference/organization/delete.mdx +89 -0
  241. package/.docs/organized/docs/reference/organization/get-by-external-id.mdx +40 -0
  242. package/.docs/organized/docs/reference/organization/get.mdx +104 -0
  243. package/.docs/organized/docs/reference/organization/index.mdx +274 -0
  244. package/.docs/organized/docs/reference/organization/list.mdx +258 -0
  245. package/.docs/organized/docs/reference/organization/update.mdx +236 -0
  246. package/.docs/organized/docs/reference/organization-domain.mdx +189 -0
  247. package/.docs/organized/docs/reference/pagination.mdx +244 -0
  248. package/.docs/organized/docs/reference/radar/attempts/create.mdx +115 -0
  249. package/.docs/organized/docs/reference/radar/attempts/index.mdx +7 -0
  250. package/.docs/organized/docs/reference/radar/attempts/update.mdx +34 -0
  251. package/.docs/organized/docs/reference/radar/index.mdx +8 -0
  252. package/.docs/organized/docs/reference/radar/lists/delete.mdx +36 -0
  253. package/.docs/organized/docs/reference/radar/lists/index.mdx +7 -0
  254. package/.docs/organized/docs/reference/radar/lists/update.mdx +36 -0
  255. package/.docs/organized/docs/reference/rate-limits.mdx +50 -0
  256. package/.docs/organized/docs/reference/roles/index.mdx +268 -0
  257. package/.docs/organized/docs/reference/roles/list-for-organization.mdx +152 -0
  258. package/.docs/organized/docs/reference/sso/connection/delete.mdx +89 -0
  259. package/.docs/organized/docs/reference/sso/connection/get.mdx +104 -0
  260. package/.docs/organized/docs/reference/sso/connection/index.mdx +388 -0
  261. package/.docs/organized/docs/reference/sso/connection/list.mdx +320 -0
  262. package/.docs/organized/docs/reference/sso/get-authorization-url/error-codes.mdx +28 -0
  263. package/.docs/organized/docs/reference/sso/get-authorization-url/index.mdx +434 -0
  264. package/.docs/organized/docs/reference/sso/get-authorization-url/redirect-uri.mdx +21 -0
  265. package/.docs/organized/docs/reference/sso/index.mdx +8 -0
  266. package/.docs/organized/docs/reference/sso/logout/authorize.mdx +47 -0
  267. package/.docs/organized/docs/reference/sso/logout/index.mdx +14 -0
  268. package/.docs/organized/docs/reference/sso/logout/redirect.mdx +32 -0
  269. package/.docs/organized/docs/reference/sso/profile/get-profile-and-token.mdx +229 -0
  270. package/.docs/organized/docs/reference/sso/profile/get-user-profile.mdx +127 -0
  271. package/.docs/organized/docs/reference/sso/profile/index.mdx +364 -0
  272. package/.docs/organized/docs/reference/testing.mdx +8 -0
  273. package/.docs/organized/docs/reference/user-management/access-token/index.mdx +13 -0
  274. package/.docs/organized/docs/reference/user-management/authentication/code.mdx +448 -0
  275. package/.docs/organized/docs/reference/user-management/authentication/email-verification.mdx +359 -0
  276. package/.docs/organized/docs/reference/user-management/authentication/get-authorization-url/error-codes.mdx +25 -0
  277. package/.docs/organized/docs/reference/user-management/authentication/get-authorization-url/index.mdx +425 -0
  278. package/.docs/organized/docs/reference/user-management/authentication/get-authorization-url/pkce.mdx +9 -0
  279. package/.docs/organized/docs/reference/user-management/authentication/get-authorization-url/redirect-uri.mdx +23 -0
  280. package/.docs/organized/docs/reference/user-management/authentication/index.mdx +66 -0
  281. package/.docs/organized/docs/reference/user-management/authentication/magic-auth.mdx +353 -0
  282. package/.docs/organized/docs/reference/user-management/authentication/organization-selection.mdx +349 -0
  283. package/.docs/organized/docs/reference/user-management/authentication/password.mdx +350 -0
  284. package/.docs/organized/docs/reference/user-management/authentication/refresh-and-seal-session-data.mdx +57 -0
  285. package/.docs/organized/docs/reference/user-management/authentication/refresh-token.mdx +381 -0
  286. package/.docs/organized/docs/reference/user-management/authentication/session-cookie.mdx +79 -0
  287. package/.docs/organized/docs/reference/user-management/authentication/totp.mdx +369 -0
  288. package/.docs/organized/docs/reference/user-management/authentication-errors/email-verification-required-error.mdx +42 -0
  289. package/.docs/organized/docs/reference/user-management/authentication-errors/index.mdx +20 -0
  290. package/.docs/organized/docs/reference/user-management/authentication-errors/mfa-challenge-error.mdx +44 -0
  291. package/.docs/organized/docs/reference/user-management/authentication-errors/mfa-enrollment-error.mdx +37 -0
  292. package/.docs/organized/docs/reference/user-management/authentication-errors/organization-authentication-required-error.mdx +68 -0
  293. package/.docs/organized/docs/reference/user-management/authentication-errors/organization-selection-error.mdx +44 -0
  294. package/.docs/organized/docs/reference/user-management/authentication-errors/sso-required-error.mdx +51 -0
  295. package/.docs/organized/docs/reference/user-management/email-verification/get.mdx +88 -0
  296. package/.docs/organized/docs/reference/user-management/email-verification/index.mdx +227 -0
  297. package/.docs/organized/docs/reference/user-management/identity/index.mdx +74 -0
  298. package/.docs/organized/docs/reference/user-management/identity/list.mdx +52 -0
  299. package/.docs/organized/docs/reference/user-management/index.mdx +13 -0
  300. package/.docs/organized/docs/reference/user-management/invitation/accept.mdx +39 -0
  301. package/.docs/organized/docs/reference/user-management/invitation/find-by-token.mdx +87 -0
  302. package/.docs/organized/docs/reference/user-management/invitation/get.mdx +87 -0
  303. package/.docs/organized/docs/reference/user-management/invitation/index.mdx +374 -0
  304. package/.docs/organized/docs/reference/user-management/invitation/list.mdx +247 -0
  305. package/.docs/organized/docs/reference/user-management/invitation/revoke.mdx +90 -0
  306. package/.docs/organized/docs/reference/user-management/invitation/send.mdx +230 -0
  307. package/.docs/organized/docs/reference/user-management/logout/get-logout-url-from-session-cookie.mdx +52 -0
  308. package/.docs/organized/docs/reference/user-management/logout/get-logout-url.mdx +147 -0
  309. package/.docs/organized/docs/reference/user-management/logout/index.mdx +26 -0
  310. package/.docs/organized/docs/reference/user-management/magic-auth/create.mdx +148 -0
  311. package/.docs/organized/docs/reference/user-management/magic-auth/get.mdx +88 -0
  312. package/.docs/organized/docs/reference/user-management/magic-auth/index.mdx +225 -0
  313. package/.docs/organized/docs/reference/user-management/mfa/authentication-challenge.mdx +194 -0
  314. package/.docs/organized/docs/reference/user-management/mfa/authentication-factor.mdx +324 -0
  315. package/.docs/organized/docs/reference/user-management/mfa/enroll-auth-factor.mdx +296 -0
  316. package/.docs/organized/docs/reference/user-management/mfa/index.mdx +5 -0
  317. package/.docs/organized/docs/reference/user-management/mfa/list-auth-factors.mdx +194 -0
  318. package/.docs/organized/docs/reference/user-management/organization-membership/create.mdx +155 -0
  319. package/.docs/organized/docs/reference/user-management/organization-membership/deactivate.mdx +106 -0
  320. package/.docs/organized/docs/reference/user-management/organization-membership/delete.mdx +76 -0
  321. package/.docs/organized/docs/reference/user-management/organization-membership/get.mdx +95 -0
  322. package/.docs/organized/docs/reference/user-management/organization-membership/index.mdx +265 -0
  323. package/.docs/organized/docs/reference/user-management/organization-membership/list.mdx +291 -0
  324. package/.docs/organized/docs/reference/user-management/organization-membership/reactivate.mdx +106 -0
  325. package/.docs/organized/docs/reference/user-management/organization-membership/update.mdx +119 -0
  326. package/.docs/organized/docs/reference/user-management/password-reset/create.mdx +108 -0
  327. package/.docs/organized/docs/reference/user-management/password-reset/get.mdx +88 -0
  328. package/.docs/organized/docs/reference/user-management/password-reset/index.mdx +227 -0
  329. package/.docs/organized/docs/reference/user-management/password-reset/reset-password.mdx +144 -0
  330. package/.docs/organized/docs/reference/user-management/session-helpers/authenticate.mdx +176 -0
  331. package/.docs/organized/docs/reference/user-management/session-helpers/get-logout-url.mdx +42 -0
  332. package/.docs/organized/docs/reference/user-management/session-helpers/index.mdx +14 -0
  333. package/.docs/organized/docs/reference/user-management/session-helpers/load-sealed-session.mdx +105 -0
  334. package/.docs/organized/docs/reference/user-management/session-helpers/refresh.mdx +213 -0
  335. package/.docs/organized/docs/reference/user-management/session-tokens/access-token.mdx +90 -0
  336. package/.docs/organized/docs/reference/user-management/session-tokens/index.mdx +5 -0
  337. package/.docs/organized/docs/reference/user-management/session-tokens/jwks.mdx +110 -0
  338. package/.docs/organized/docs/reference/user-management/session-tokens/refresh-token.mdx +8 -0
  339. package/.docs/organized/docs/reference/user-management/user/create.mdx +327 -0
  340. package/.docs/organized/docs/reference/user-management/user/delete.mdx +76 -0
  341. package/.docs/organized/docs/reference/user-management/user/get-by-external-id.mdx +39 -0
  342. package/.docs/organized/docs/reference/user-management/user/get.mdx +103 -0
  343. package/.docs/organized/docs/reference/user-management/user/index.mdx +322 -0
  344. package/.docs/organized/docs/reference/user-management/user/list.mdx +260 -0
  345. package/.docs/organized/docs/reference/user-management/user/update.mdx +344 -0
  346. package/.docs/organized/docs/reference/vault/index.mdx +6 -0
  347. package/.docs/organized/docs/reference/vault/key/create-data-key.mdx +106 -0
  348. package/.docs/organized/docs/reference/vault/key/decrypt-data-key.mdx +84 -0
  349. package/.docs/organized/docs/reference/vault/key/decrypt-data.mdx +52 -0
  350. package/.docs/organized/docs/reference/vault/key/encrypt-data.mdx +58 -0
  351. package/.docs/organized/docs/reference/vault/key/index.mdx +25 -0
  352. package/.docs/organized/docs/reference/vault/object/create.mdx +62 -0
  353. package/.docs/organized/docs/reference/vault/object/delete.mdx +75 -0
  354. package/.docs/organized/docs/reference/vault/object/get.mdx +50 -0
  355. package/.docs/organized/docs/reference/vault/object/index.mdx +174 -0
  356. package/.docs/organized/docs/reference/vault/object/list.mdx +105 -0
  357. package/.docs/organized/docs/reference/vault/object/metadata.mdx +52 -0
  358. package/.docs/organized/docs/reference/vault/object/update.mdx +67 -0
  359. package/.docs/organized/docs/reference/vault/object/version.mdx +87 -0
  360. package/.docs/organized/docs/reference/vault/object/versions.mdx +83 -0
  361. package/.docs/organized/docs/reference/widgets/get-token.mdx +185 -0
  362. package/.docs/organized/docs/reference/widgets/index.mdx +6 -0
  363. package/.docs/organized/docs/reference/workos-connect/authorize/index.mdx +75 -0
  364. package/.docs/organized/docs/reference/workos-connect/index.mdx +33 -0
  365. package/.docs/organized/docs/reference/workos-connect/introspection/index.mdx +122 -0
  366. package/.docs/organized/docs/reference/workos-connect/metadata/index.mdx +25 -0
  367. package/.docs/organized/docs/reference/workos-connect/metadata/oauth-authorization-server/index.mdx +99 -0
  368. package/.docs/organized/docs/reference/workos-connect/metadata/openid-configuration/index.mdx +70 -0
  369. package/.docs/organized/docs/reference/workos-connect/token/authorization-code-grant/access-token.mdx +53 -0
  370. package/.docs/organized/docs/reference/workos-connect/token/authorization-code-grant/id-token.mdx +60 -0
  371. package/.docs/organized/docs/reference/workos-connect/token/authorization-code-grant/index.mdx +69 -0
  372. package/.docs/organized/docs/reference/workos-connect/token/client-credentials-grant/access-token.mdx +46 -0
  373. package/.docs/organized/docs/reference/workos-connect/token/client-credentials-grant/index.mdx +56 -0
  374. package/.docs/organized/docs/reference/workos-connect/token/index.mdx +39 -0
  375. package/.docs/organized/docs/reference/workos-connect/token/refresh-token-grant.mdx +69 -0
  376. package/.docs/organized/docs/reference/workos-connect/userinfo/index.mdx +46 -0
  377. package/.docs/organized/docs/sdks/dotnet.mdx +6 -0
  378. package/.docs/organized/docs/sdks/elixir.mdx +6 -0
  379. package/.docs/organized/docs/sdks/go.mdx +6 -0
  380. package/.docs/organized/docs/sdks/java.mdx +9 -0
  381. package/.docs/organized/docs/sdks/laravel.mdx +6 -0
  382. package/.docs/organized/docs/sdks/node.mdx +9 -0
  383. package/.docs/organized/docs/sdks/php.mdx +6 -0
  384. package/.docs/organized/docs/sdks/python.mdx +6 -0
  385. package/.docs/organized/docs/sdks/ruby.mdx +9 -0
  386. package/.docs/organized/docs/sso/_navigation.mdx +44 -0
  387. package/.docs/organized/docs/sso/_sequence-diagrams/saml-protocol-security-considerations.md +59 -0
  388. package/.docs/organized/docs/sso/attributes.mdx +110 -0
  389. package/.docs/organized/docs/sso/domains.mdx +111 -0
  390. package/.docs/organized/docs/sso/example-apps.mdx +46 -0
  391. package/.docs/organized/docs/sso/identity-provider-role-assignment.mdx +113 -0
  392. package/.docs/organized/docs/sso/index.mdx +295 -0
  393. package/.docs/organized/docs/sso/it-team-faq.mdx +35 -0
  394. package/.docs/organized/docs/sso/jit-provisioning.mdx +101 -0
  395. package/.docs/organized/docs/sso/launch-checklist.mdx +71 -0
  396. package/.docs/organized/docs/sso/login-flows.mdx +101 -0
  397. package/.docs/organized/docs/sso/redirect-uris.mdx +44 -0
  398. package/.docs/organized/docs/sso/saml-security.mdx +122 -0
  399. package/.docs/organized/docs/sso/signing-certificates.mdx +121 -0
  400. package/.docs/organized/docs/sso/single-logout.mdx +45 -0
  401. package/.docs/organized/docs/sso/test-sso.mdx +73 -0
  402. package/.docs/organized/docs/sso/ux/sign-in.mdx +44 -0
  403. package/.docs/organized/docs/user-management/_navigation.mdx +87 -0
  404. package/.docs/organized/docs/user-management/actions.mdx +169 -0
  405. package/.docs/organized/docs/user-management/authkit.mdx +69 -0
  406. package/.docs/organized/docs/user-management/branding.mdx +143 -0
  407. package/.docs/organized/docs/user-management/connect.mdx +110 -0
  408. package/.docs/organized/docs/user-management/custom-emails.mdx +164 -0
  409. package/.docs/organized/docs/user-management/directory-provisioning.mdx +78 -0
  410. package/.docs/organized/docs/user-management/domain-verification.mdx +28 -0
  411. package/.docs/organized/docs/user-management/email-password.mdx +42 -0
  412. package/.docs/organized/docs/user-management/email-verification.mdx +29 -0
  413. package/.docs/organized/docs/user-management/entitlements.mdx +46 -0
  414. package/.docs/organized/docs/user-management/example-apps.mdx +39 -0
  415. package/.docs/organized/docs/user-management/identity-linking.mdx +52 -0
  416. package/.docs/organized/docs/user-management/impersonation.mdx +82 -0
  417. package/.docs/organized/docs/user-management/index.mdx +525 -0
  418. package/.docs/organized/docs/user-management/invitations.mdx +60 -0
  419. package/.docs/organized/docs/user-management/invite-only-signup.mdx +72 -0
  420. package/.docs/organized/docs/user-management/jit-provisioning.mdx +36 -0
  421. package/.docs/organized/docs/user-management/jwt-templates.mdx +278 -0
  422. package/.docs/organized/docs/user-management/magic-auth.mdx +36 -0
  423. package/.docs/organized/docs/user-management/mcp.mdx +146 -0
  424. package/.docs/organized/docs/user-management/metadata.mdx +119 -0
  425. package/.docs/organized/docs/user-management/mfa.mdx +32 -0
  426. package/.docs/organized/docs/user-management/migrations.mdx +20 -0
  427. package/.docs/organized/docs/user-management/modeling-your-app.mdx +149 -0
  428. package/.docs/organized/docs/user-management/organization-policies.mdx +33 -0
  429. package/.docs/organized/docs/user-management/overview.mdx +46 -0
  430. package/.docs/organized/docs/user-management/passkeys.mdx +42 -0
  431. package/.docs/organized/docs/user-management/radar.mdx +127 -0
  432. package/.docs/organized/docs/user-management/roles-and-permissions.mdx +155 -0
  433. package/.docs/organized/docs/user-management/sessions.mdx +101 -0
  434. package/.docs/organized/docs/user-management/social-login.mdx +34 -0
  435. package/.docs/organized/docs/user-management/sso-with-contractors.mdx +85 -0
  436. package/.docs/organized/docs/user-management/sso.mdx +96 -0
  437. package/.docs/organized/docs/user-management/users-organizations.mdx +91 -0
  438. package/.docs/organized/docs/user-management/widgets.mdx +190 -0
  439. package/.docs/organized/docs/vault/_navigation.mdx +14 -0
  440. package/.docs/organized/docs/vault/index.mdx +38 -0
  441. package/.docs/organized/docs/vault/key-context.mdx +32 -0
  442. package/.docs/organized/docs/vault/quick-start.mdx +82 -0
  443. package/README.md +252 -0
  444. package/dist/chunk-64GKEK6G.js +48 -0
  445. package/dist/chunk-64GKEK6G.js.map +1 -0
  446. package/dist/get-tools.d.ts +23 -0
  447. package/dist/get-tools.js +8 -0
  448. package/dist/get-tools.js.map +1 -0
  449. package/dist/index.d.ts +1 -0
  450. package/dist/index.js +552 -0
  451. package/dist/index.js.map +1 -0
  452. package/dist/prepare.d.ts +2 -0
  453. package/dist/prepare.js +269 -0
  454. package/dist/prepare.js.map +1 -0
  455. package/package.json +49 -0
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: Email delivery
3
+ description: Best practices for sending email with WorkOS.
4
+ breadcrumb:
5
+ title: Home
6
+ url: /
7
+ originalPath: .tmp-workos-clone/packages/docs/content/email.mdx
8
+ ---
9
+
10
+ ## Introduction
11
+
12
+ Many WorkOS features rely on your users receiving and acting upon email. For example, this includes invitations to join your app, password reset links, or Magic Auth sign-in. Prompt delivery of these emails is crucial.
13
+
14
+ WorkOS offers three options for sending email:
15
+
16
+ - **WorkOS email domain:** WorkOS sends email from the `workos-mail.com` domain.
17
+ - **Your email domain:** WorkOS sends email from your own email domain.
18
+ - **Send your own email:** WorkOS emits events, allowing your app to listen to these events and send email using your own email provider.
19
+
20
+ These options provide different trade-offs between convenience, customization, and control over email deliverability.
21
+
22
+ WorkOS follows industry best practices when sending email. SPF and DKIM email authentication records are configured automatically, the email content is continually refined to ensure it passes spam filters, and delivery of every email is actively monitored. However, regardless of the option you chose for sending email to your users, there are additional steps you can take to ensure that it reaches user inboxes.
23
+
24
+ ---
25
+
26
+ ## (A) WorkOS email domain
27
+
28
+ By default WorkOS will send the following emails from the `workos-mail.com` domain in production environments.
29
+
30
+ | Email | Sent From | Purpose |
31
+ | ------------------ | :---------------------- | :------------------------------------- |
32
+ | Invitation | welcome@workos-mail.com | Invite a user to create an account |
33
+ | Magic Auth | access@workos-mail.com | Allow sign in with a one-time-use code |
34
+ | Email verification | welcome@workos-mail.com | Verify ownership of a given email |
35
+ | Password reset | access@workos-mail.com | Support the password reset flow |
36
+
37
+ WorkOS has configured SPF, DKIM and DMARC email authentication records for the `workos-mail.com` domain. These records prove to the receiving mail server that a given email comes from WorkOS.
38
+
39
+ We actively monitor the delivery of email sent from the `workos-mail.com` domain to protect the domain's reputation. If we detect unusually high rates of undelivered mail or mail marked as spam from a WorkOS team account, we may suspend that team's ability to send email.
40
+
41
+ ### Do not send unsolicited email
42
+
43
+ To ensure email is delivered when using the WorkOS email domain, be sure not to allow unsolicited email to be sent on your behalf. For example, an invitation email should be sent only if a user explicitly requests access to your application for themselves or another user. Do not attempt to bulk invite users from an email marketing list.
44
+
45
+ ### Use appropriate team and organization names
46
+
47
+ It is also important to ensure that your WorkOS team account and all organizations under your team have appropriate names that avoid [common spam words](https://mailtrap.io/blog/email-spam-words/) that may trigger spam filters. While our static email content is thoroughly tested, WorkOS emails can include your team name as well as the names of organizations under your team. There may be an impact to email deliverability if these names use terms often flagged by spam filters.
48
+
49
+ ---
50
+
51
+ ## (B) Your email domain
52
+
53
+ While using the WorkOS email domain option is convenient, you can provide your users a better experience. Using your own email domain means that your users will receive emails from a domain they recognize, one associated with your app. In addition, because you control the email domain, you have more control over the domain reputation and therefore more control over email deliverability.
54
+
55
+ You can configure your own email domain in the [WorkOS dashboard](https://dashboard.workos.com). You will need to verify ownership of the domain by setting up a CNAME record with your domain provider. Two additional CNAME records are required to automatically configure SPF and DKIM email authentication using [Sendgrid's automated security feature](https://support.sendgrid.com/hc/en-us/articles/21415314709147-Email-Authentication-SendGrid-s-Automated-Security-Explained).
56
+
57
+ ![Configuring your email domain](https://images.workoscdn.com/images/84e47c58-e5e5-47c3-8245-f414a203f284.png?auto=format&fit=clip&q=50)
58
+
59
+ In addition to not sending unsolicited emails and using appropriate team and organization names, when using your own email domain there are a few additional steps you can take to ensure email is delivered promptly.
60
+
61
+ ### Set up inboxes
62
+
63
+ When using your own domain, email will be sent from `welcome@<your domain>` and `access@<your domain>`. Email providers check if there are inboxes associated with sender addresses, so setting up inboxes for both the `welcome` and `access` email addresses on your domain can help ensure your emails reach users.
64
+
65
+ ### Set up DMARC
66
+
67
+ WorkOS recommends that you set up DMARC (Domain-based Message Authentication, Reporting & Conformance) with your domain provider. Google has released [guidelines](https://support.google.com/a/answer/81126?visit_id=638529785140327067-2643207201&rd=1#zippy=%2Crequirements-for-all-senders%2Crequirements-for-sending-or-more-messages-per-day) for email senders and the guidelines include DMARC requirements. Apple and Yahoo have released similar best practice guides.
68
+
69
+ A DMARC policy tells a receiving mail server what to do when a message from your domain doesn’t pass DMARC authentication. Configuring DMARC requires setting up a DNS TXT record with your domain provider.
70
+
71
+ Here is an example DMARC record that will reject all emails not legitimately sent by an email provider on your behalf:
72
+
73
+ ```plaintext
74
+ TXT Record
75
+
76
+ name:
77
+ _dmarc<.example.com>
78
+
79
+ content:
80
+ v=DMARC1; p=reject; rua=mailto:postmaster@example.com, mailto:dmarc@example.com; pct=100; adkim=s; aspf=s
81
+ ```
82
+
83
+ More details about DMARC can be found at [dmarc.org](https://dmarc.org/overview/).
84
+
85
+ ---
86
+
87
+ ## (C) Send your own email
88
+
89
+ There are a number of reasons why you may want to send email using your own email provider. Perhaps you already send a welcome email to new users and want to include an invitation link instead of sending a second email. Perhaps you want to translate the email text into different languages. Perhaps you already track sent email status with your own email provider and want a unified view into the status of all emails associated with your app. Regardless, when you send your own email, you have complete control over email deliverability.
90
+
91
+ For complete instructions on sending your own email, see the section on [custom emails](/user-management/custom-emails) in the user management documentation.
92
+
93
+ When sending your own email, you will want to follow the all of the recommendations in Google's [email sender guidelines](https://support.google.com/a/answer/81126?hl=en). This includes setting up SPF, DKIM and DMARC email authentication.
94
+
95
+ You will also need to be conscious of your sender reputation. It's based on the quality of emails, their frequency, and user interaction. A good sender reputation can increase the chances of your emails reaching inboxes. Sendgrid provides some [useful tips for improving sender reputation](https://sendgrid.com/en-us/blog/email-reputation-101-ip-reputation-vs-domain-reputation).
96
+
97
+ If you author your own email content, you may want to test your emails against various email providers' spam filters. There are a number of spam testing services available such as [Litmus](https://www.litmus.com/email-testing) and [Warmly](https://www.warmy.io/free-tools/email-deliverability-test/).
98
+
99
+ ---
100
+
101
+ ## Troubleshooting
102
+
103
+ Even when following industry best practices, an email may get filtered as spam and not reach a user's inbox. Other times an email might be delayed, for example, when [Enhanced Pre-delivery Message Scanning](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F7380368%3Fhl%3Den&product_context=7380368&product_name=UnuFlow&trigger_context=a) is enabled on a Google workspace or when a similar feature is enabled with other email providers. Email providers do not explain the heuristics used by their spam filters and security mechanisms, and they are often changing, making it especially frustrating to troubleshoot problems.
104
+
105
+ The first step in troubleshooting is to determine if the problem exists for all users or only a subset of users. Generally, this will provide insight into the nature of the issue and how best to resolve it. If the issue exists for all users, it is most likely a matter of poor domain reputation. If the issue only exists for a subset of users, it may be because of specific settings used by an email provider or the IT department at a given organization.
106
+
107
+ Both Google and Microsoft have been noted as being especially aggressive when identifying spam. However, both companies provide some tooling to help you debug email deliverability problems. Google offers [Postmaster Tools](https://www.gmail.com/postmaster/) to help with email deliverability related to Gmail and Google Workspaces. Microsoft offers similar tools with [Sender Support](https://sendersupport.olc.protection.outlook.com/pm/). Lastly, more general spam testing services such as [Litmus](https://www.litmus.com/email-testing) and [Warmly](https://www.warmy.io/free-tools/email-deliverability-test/) are available.
108
+
109
+ If you continue to have issues regarding email deliverability despite following all of the above suggestions, please [contact support](mailto:support@workos.com).
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Events
3
+ links:
4
+ - title: Event types
5
+ url: /events
6
+ - title: Data syncing
7
+ links:
8
+ - title: Overview
9
+ url: /events/data-syncing
10
+ - title: Syncing with events API
11
+ url: /events/data-syncing/events-api
12
+ - title: Syncing with webhooks
13
+ url: /events/data-syncing/webhooks
14
+ - title: Data reconciliation
15
+ url: /events/data-syncing/data-reconciliation
16
+ - title: Observability
17
+ links:
18
+ - title: Streaming to Datadog
19
+ url: /events/observability/datadog
20
+ originalPath: .tmp-workos-clone/packages/docs/content/events/_navigation.mdx
21
+ ---
22
+
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: Data reconciliation
3
+ description: Keep your app in sync with WorkOS.
4
+ originalPath: >-
5
+ .tmp-workos-clone/packages/docs/content/events/data-syncing/data-reconciliation.mdx
6
+ ---
7
+
8
+ ## Introduction
9
+
10
+ While the events API makes it easier to keep your app in sync with WorkOS, there may still be cases where your app gets out of sync. For example, your app may have a bug in its event processing logic or in rarer cases, may experience some data loss.
11
+
12
+ Data reconciliation refers to the process of comparing and aligning the state of objects between WorkOS and your app to ensure consistency. Depending on the scope of the issue, you can reconcile your app state by either replaying events from the [events API](/reference/events) or by using the WorkOS [state API](/reference).
13
+
14
+ ## Definitions
15
+
16
+ **Data reconciliation**
17
+ : Refers to the process of comparing and aligning data from different sources or systems to ensure consistency and accuracy. The goal of data reconciliation is to ensure that all relevant data sources are synchronized and reflect the same information.
18
+
19
+ **Event replay**
20
+ : Is the act of reprocessing recorded events in an app. It is used to recreate past event sequences for debugging, testing, auditing, or ensuring data consistency.
21
+
22
+ **Side effects**
23
+ : These are secondary consequences that arise from data modifications in an app. They can alter related data, trigger additional processes, update external systems, or affect the app’s overall state. e.g., Sending an email on a user’s profile change.
24
+
25
+ **Periodic reconciliation**
26
+ : Is the regular process of comparing and synchronizing data between systems to ensure accuracy and consistency. It involves scheduled checks to identify and resolve discrepancies in data integrity.
27
+
28
+ ## Reconciling via the events API
29
+
30
+ In general, reconciling state changes between WorkOS and your app using the events API is simplest. Pick your cursor, which is usually the last known cursor you have processed, and paginate through events using the `after` parameter.
31
+
32
+ For special cases such as webhook migration or event replay, you can specify a starting time for event consumption using the `range_start` parameter.
33
+
34
+ ### Handling side effects in the case of event replay
35
+
36
+ Side effects, such as sending emails, updating 3rd party APIs, or performing other actions specific to your app, present challenges during event replay.
37
+
38
+ Separating data handling from business logic allows you to exercise control over what actions you want your app to make. This allows your app to replay events to sync data but bypass transactional logic e.g., not sending out the same email twice.
39
+
40
+ ## Reconciling via the WorkOS state API
41
+
42
+ Your app may perform data reconciliation by syncing state via the WorkOS [state APIs](/reference) e.g., in disaster recovery scenarios.
43
+
44
+ Data reconciliation using state APIs requires performing diffs to identify deletions to ensure the correct state is maintained. This introduces additional complexity, making it essential to carefully design and test the reconciliation process.
45
+
46
+ The general approach for reconciling data via the state API is as follows:
47
+
48
+ 1. Pull state from WorkOS API for the objects your app is interested in.
49
+ 2. Update based on `updated_at`. If the timestamp is out of date, update the object.
50
+ 3. Identify deactivated objects or deletions and sync that state.
51
+
52
+ If you need to force all objects to update state, perform a complete resynchronization of the affected data instead of relying solely on the `updated_at` timestamp. Update all objects regardless of the individual `updated_at` timestamp.
53
+
54
+ ### Considerations for periodic reconciliation
55
+
56
+ In some cases, you may want to run periodic reconciliation jobs to proactively check and reconcile the state between WorkOS and your app. When implementing such jobs, it is important to account for potential race conditions for concurrent updates. Additionally, consider the specific characteristics of your app to determine the frequency and scope of periodic reconciliation.
@@ -0,0 +1,114 @@
1
+ ---
2
+ title: "Sync data using the events\_API"
3
+ description: "A step-by-step guide on how to start syncing data using the\_API."
4
+ originalPath: .tmp-workos-clone/packages/docs/content/events/data-syncing/events-api.mdx
5
+ ---
6
+
7
+ ## What you’ll build
8
+
9
+ In this guide, we will walk you through what you will need to integrate with the [events API](/reference/events):
10
+
11
+ - Create a _cursor_ for use with the events API
12
+ - Update your cursor
13
+ - Choose a cursor if you lose yours
14
+ - Handle event replay in your app
15
+
16
+ ## Before getting started
17
+
18
+ To get the most out of this guide, you’ll need:
19
+
20
+ - A [WorkOS account](https://dashboard.workos.com/)
21
+ - An [SSO](/sso/1-add-sso-to-your-app) or [directory](/directory-sync/quick-start/1-create-a-new-directory-connection) connection configured in order to generate events
22
+
23
+ ---
24
+
25
+ ## (1) Integrate the events API SDK
26
+
27
+ WorkOS offers native SDKs in several popular programming languages. Choose a language below to see instructions in your app’s language.
28
+
29
+ <LanguageSelector languages={['js', 'ruby', 'python', 'go']}>
30
+ Install the SDK using the command below.
31
+
32
+ <CodeBlock title="Install the WorkOS SDK" file="install-sdk">
33
+ <CodeBlockTab language="js" file="install-sdk-npm" title="npm" />
34
+ <CodeBlockTab language="js" file="install-sdk-yarn" title="Yarn" />
35
+ <CodeBlockTab language="ruby" file="install-sdk-terminal" title="Terminal" />
36
+ <CodeBlockTab language="ruby" file="install-sdk-bundler" title="Bundler" />
37
+ </CodeBlock>
38
+ </LanguageSelector>
39
+
40
+ ### Set secrets
41
+
42
+ To make calls to WorkOS, provide the API key and, in some cases, the client ID. Store these values as managed secrets, such as `WORKOS_API_KEY` and `WORKOS_CLIENT_ID`, and pass them to the SDKs either as environment variables or directly in your app's configuration based on your preferences.
43
+
44
+ ```plain title="Environment variables"
45
+ WORKOS_API_KEY='sk_example_123456789'
46
+ WORKOS_CLIENT_ID='client_123456789'
47
+ ```
48
+
49
+ > The code examples use your staging API keys when [signed in](https://dashboard.workos.com)
50
+
51
+ ---
52
+
53
+ ## (2) Start consuming events
54
+
55
+ Your app can start consuming events once it integrates the WorkOS SDK. The first thing to do is to pick a starting place in the data set.
56
+
57
+ ### Keep a cursor
58
+
59
+ A _cursor_ is a bookmark to track your app’s position in the events list. The very first call to the events API won’t have a cursor. Subsequent requests to WorkOS should include the updated cursor using the `after` parameter. You will need to update and store your cursor after processing an event.
60
+
61
+ ### Avoid overwriting newer data
62
+
63
+ To avoid repeating an update, store the `updated_at` timestamp provided by WorkOS for each object. Extract this tag from the data object in the event. If the `updated_at` timestamp in the event is newer, update the local state with the latest event data. Otherwise, you can skip processing that event.
64
+
65
+ ---
66
+
67
+ ## (3) Select event types
68
+
69
+ Determine the [event types](/events) you want to consume. Choose the relevant event types that align with your app’s functionality and integration with WorkOS.
70
+
71
+ <CodeBlock title="List events" file="list-events" />
72
+
73
+ Retrieve events from the API using cursor pagination. To fetch the next set of events, provide the ID of the latest processed event in the `after` parameter.
74
+
75
+ ---
76
+
77
+ ## (4) Handle event replay
78
+
79
+ In some cases, it may be necessary to go back in time and “replay” the events. When designing your app logic to handle events replay it is important to design your event handling logic in a way that can safely accommodate it without undesired effects.
80
+
81
+ To achieve this, focus on separating your app’s data handlers from transactional business logic like sending emails, communicating to 3rd party APIs, etc. By implementing separate data handling, you can replay events without side effects.
82
+
83
+ WorkOS recommends processing events synchronously, handling them in the order they occurred.
84
+
85
+ > The events API returns events up to 90 days old. You can query for up to 30 days of events per request.
86
+
87
+ ### If your app stops processing events
88
+
89
+ When resuming event processing, you have two options to pick up where you left off:
90
+
91
+ - **Using the latest known cursor:** Retrieve the most recent cursor that was successfully processed and use it as the starting point for event resumption.
92
+ - **Using a timestamp:** Alternatively, you can make an API call with the `range_start` parameter and then use the cursor. Utilize the `updated_at` timestamp to prevent overwrites.
93
+
94
+ ---
95
+
96
+ ## Scaling recommendations
97
+
98
+ ### Single consumer
99
+
100
+ WorkOS recommends that your app starts with a single worker. Process events in a separate thread or process from your app’s main execution thread. Deploying a single worker responsible for handling events simplifies and streamlines event consumption.
101
+
102
+ This approach ensures serial event processing. After completing the processing of events on the current page, request the next page of events to maintain progress.
103
+
104
+ ### Parallel processing
105
+
106
+ For onboarding large organizations, divide events into independent queues for parallel processing when calling the events API from a single worker.
107
+
108
+ Concurrently processing events from different organizations is safe, but for consistency and integrity, it is recommended to sequentially process events within a single organization.
109
+
110
+ ---
111
+
112
+ ## Migrating from webhooks
113
+
114
+ You can migrate to the events API if you already use webhooks. To migrate, start querying the events API using the `range_start` parameter that corresponds to the time you’d want to start syncing from. The event IDs passed in webhook bodies are the same as those returned by the events API.
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: Data syncing
3
+ description: Keep your app in sync with WorkOS.
4
+ showNextPage: true
5
+ originalPath: .tmp-workos-clone/packages/docs/content/events/data-syncing/index.mdx
6
+ ---
7
+
8
+ ## Introduction
9
+
10
+ Syncing your app data with WorkOS is done using events. Events represent activity that has occurred within WorkOS or within third-party identity and directory providers that interact with WorkOS.
11
+
12
+ When important activity occurs, we record an event. For example, a new SSO connection being activated is an event. A user being created, assigned membership to an organization, or successfully signing in are all events as well. Events are activity that your application might be interested in for the purposes of syncing data or extending your application's business logic.
13
+
14
+ Your app can consume events from WorkOS via either the events API or webhooks.
15
+
16
+ ```json language="json" title="A sample event"
17
+ {
18
+ "object": "event",
19
+ "id": "event_07FKJ843CVE8F7BXQSPFH0M53V",
20
+ "event": "dsync.user.updated",
21
+ "data": {
22
+ "id": "directory_user_01E1X1B89NH8Z3SDFJR4H7RGX7",
23
+ "directory_id": "directory_01ECAZ4NV9QMV47GW873HDCX74",
24
+ "organization_id": "org_01EZTR6WYX1A0DSE2CYMGXQ24Y",
25
+ "idp_id": "8931",
26
+ "first_name": "Lela",
27
+ "last_name": "Block",
28
+ "email": "lela.block@example.com",
29
+ "state": "active",
30
+ "created_at": "2021-06-25T19:07:33.155Z",
31
+ "updated_at": "2021-06-25T19:07:33.155Z",
32
+ "custom_attributes": {
33
+ "department": "Engineering",
34
+ "job_title": "Software Engineer"
35
+ },
36
+ "role": { "slug": "member" },
37
+ "raw_attributes": {}
38
+ },
39
+ "created_at": "2023-04-28 20:05:31.093"
40
+ }
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Sync using the events API
46
+
47
+ With the events API, your application retrieves events from WorkOS. The events API offers a more robust data synchronization solution compared to webhooks, ensuring seamless synchronization of your system state with WorkOS. To sync data using the events API, continue to the [events API guide](/events/data-syncing/events-api).
48
+
49
+ ---
50
+
51
+ ## Sync using webhooks
52
+
53
+ With webhooks, WorkOS automatically notifies your app when an event occurs by invoking an endpoint hosted within your application. To sync data using webhooks, continue to the [webhooks guide](/events/data-syncing/webhooks).
54
+
55
+ ---
56
+
57
+ ## API vs. webhooks
58
+
59
+ Depending on your constraints, you may want to use the events API or webhooks. Here is a comparison of the two:
60
+
61
+ | Aspect | Events API | Webhooks |
62
+ | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
63
+ | Timing | Controlled by your app. Your server can process events at its own pace. | Real-time. Webhooks trigger as soon as an event occurs. |
64
+ | Order | A consistent order is guaranteed. | No guarantee of order on receipt. Events contain timestamps to determine order. |
65
+ | Reconciliation | Replayable. Can go back to a specific point in time and reprocess events. | Failed requests are retried with exponential back-off for up to 3 days. |
66
+ | Security | Authentication, confidentiality, and integrity protection by default. | You must expose a public endpoint and validate webhook signatures. |
@@ -0,0 +1,173 @@
1
+ ---
2
+ title: Sync data with webhooks
3
+ description: A step-by-step guide on how to start syncing data using webhooks.
4
+ originalPath: .tmp-workos-clone/packages/docs/content/events/data-syncing/webhooks.mdx
5
+ ---
6
+
7
+ ## What you’ll build
8
+
9
+ In this guide, we will walk you through what you will need to set up webhooks:
10
+
11
+ - Create your endpoint to receive webhook events
12
+ - Register your endpoint with WorkOS
13
+ - Process the events received from WorkOS
14
+ - Test your endpoint
15
+
16
+ ---
17
+
18
+ ## (1) Set up your webhook endpoint
19
+
20
+ Create a public endpoint that WorkOS can send events to. This endpoint should use HTTPS and should accept POST requests with the `workos-signature` header.
21
+
22
+ <CodeBlock file="webhook-endpoint">
23
+ <CodeBlockTab language="js" file="webhook-endpoint-next" title="Next.js" />
24
+ <CodeBlockTab language="js" file="webhook-endpoint-express" title="Express" />
25
+ <CodeBlockTab language="ruby" file="webhook-endpoint-rails" title="Rails" />
26
+ <CodeBlockTab
27
+ language="ruby"
28
+ file="webhook-endpoint-sinatra"
29
+ title="Sinatra"
30
+ />
31
+ <CodeBlockTab
32
+ language="python"
33
+ file="webhook-endpoint-django"
34
+ title="Django"
35
+ />
36
+ <CodeBlockTab language="python" file="webhook-endpoint-flask" title="Flask" />
37
+ </CodeBlock>
38
+
39
+ > WorkOS sends the header as `WorkOS-Signature`, but many web servers normalize HTTP request headers to their lowercase variants.
40
+
41
+ ---
42
+
43
+ ## (2) Register your endpoint
44
+
45
+ Set and save the webhook URL in the [WorkOS Dashboard](https://dashboard.workos.com/), so WorkOS knows where to deliver the events. Your webhook endpoints should only be configured to receive the ones required by your integration. Receiving all event types can put undue strain on your servers and is not recommended.
46
+
47
+ ![WorkOS Dashboard Webhooks UI](https://images.workoscdn.com/images/a6bebfe6-d5db-475c-bf34-a5bdf35433e0.png?auto=format&fit=clip&q=90)
48
+
49
+ ---
50
+
51
+ ## (3) Process the events
52
+
53
+ In order to avoid unnecessary retry requests hitting your webhook handler, we recommend using two concurrent processes for handling events: one for receiving the event, and the other for processing it.
54
+
55
+ ### Respond with HTTP 200 OK
56
+
57
+ On receiving an event, you should respond with an `HTTP 200 OK` to signal to WorkOS that the event was successfully delivered. Otherwise, WorkOS will consider the event delivery a failure and retry up to 12 times, with exponential backoff over 3 days. You do not need to signal to WorkOS whether or not the event was processed successfully.
58
+
59
+ ### (A) Validate the requests using the SDK
60
+
61
+ Before processing the request payload, verify the request was sent by WorkOS and not an unknown party.
62
+
63
+ WorkOS includes a unique signature in each webhook request that it sends, allowing you to verify the authenticity of the request. In order to verify this signature, you must obtain the secret that is generated for you when you set up your webhook endpoint in the WorkOS dashboard. Ensure that this secret is stored securely on your webhook endpoint server as an environment variable.
64
+
65
+ The SDKs provide a method to validate the timestamp and signature of a webhook. Examples using these methods are included below. The parameters are the payload (raw request body), the request header, and the webhook secret.
66
+
67
+ <CodeBlock title="Webhook validation" file="webhook-validation">
68
+ <CodeBlockTab language="ruby" file="webhook-validation-rails" title="Rails" />
69
+ <CodeBlockTab
70
+ language="ruby"
71
+ file="webhook-validation-sinatra"
72
+ title="Sinatra"
73
+ />
74
+ <CodeBlockTab
75
+ language="python"
76
+ file="webhook-validation-django"
77
+ title="Django"
78
+ />
79
+ <CodeBlockTab
80
+ language="python"
81
+ file="webhook-validation-flask"
82
+ title="Flask"
83
+ />
84
+ </CodeBlock>
85
+
86
+ There is an optional parameter, tolerance, that sets the time validation for the webhook in seconds. The SDK methods have default values for tolerance, usually 3–5 minutes.
87
+
88
+ ### (B) Validate the requests manually
89
+
90
+ If implementing webhook validation yourself, you’ll need to use the following steps:
91
+
92
+ First, extract the timestamp and signature from the header. There are two values to parse from the `WorkOS-Signature` header, delimited by a `,` character.
93
+
94
+ | Key | Value |
95
+ | ------------------ | ----------------------------------------------------------------------------------------------- |
96
+ | `issued_timestamp` | The number of milliseconds since the epoch time at which the event was issued, prefixed by `t=` |
97
+ | `signature_hash` | The HMAC SHA256 hashed signature for the request, prefixed by `v1=` |
98
+
99
+ To avoid replay attacks, we suggest validating that the `issued_timestamp` does not differ too much from the current time.
100
+
101
+ Next, construct the expected signature. The expected signature is computed from the concatenation of:
102
+
103
+ 1. `issued_timestamp`
104
+ 2. The `.` character
105
+ 3. The request’s body as a utf-8 decoded string
106
+
107
+ Hash the string using HMAC SHA256, using the webhook secret as the key. The expected signature will be the hex digest of the hash. Finally, compare signatures to make sure the webhook request is valid.
108
+
109
+ Once you’ve determined the event request is validly signed, it’s safe to use the event payload in your application’s business logic.
110
+
111
+ ### Create an IP allowlist
112
+
113
+ WorkOS sends webhooks from a fixed set of IP addresses. It’s recommended to restrict access to your webhook endpoint to only these IP addresses:
114
+
115
+ ```plain title="WorkOS IP addresses"
116
+ 3.217.146.166
117
+ 23.21.184.92
118
+ 34.204.154.149
119
+ 44.213.245.178
120
+ 44.215.236.82
121
+ 50.16.203.9
122
+ 52.1.251.34
123
+ 52.21.49.187
124
+ 174.129.36.47
125
+ ```
126
+
127
+ ---
128
+
129
+ ## (4) Test your endpoint
130
+
131
+ From the dashboard, you can send test webhook events after configuring an endpoint. Go to the webhook endpoint detail page and click the **Send test event** button. The types of events that you have configured for your endpoint are available for you to send sample payloads.
132
+
133
+ ![A screenshot showing how to send a test webhook in the WorkOS dashboard.](https://images.workoscdn.com/images/bda8fdc7-becb-494e-a9b6-f8295e5998a4.png?auto=format&fit=clip&q=90)
134
+
135
+ If you would like to test against your local development environment, we recommend using a tool like [ngrok](https://ngrok.com) to create a secure tunnel to your local machine, and sending test webhooks to the public endpoint generated with ngrok. See our [blog post](https://workos.com/blog/test-workos-webhooks-locally-ngrok) to get more details on how you may want to test webhooks locally with ngrok.
136
+
137
+ ---
138
+
139
+ ## Best practices
140
+
141
+ ### Respond to events immediately
142
+
143
+ To avoid webhook requests potentially stressing your system, WorkOS strongly recommends that you respond to a webhook request with a 200 OK response as quickly as possible once received.
144
+
145
+ If you process the event before responding, your system may not be able to handle a spike of requests. This may cause requests to timeout and result in missing important updates.
146
+
147
+ A common pattern is to store the request payload on a message queue, respond with a 200 OK response, and use a background worker to process the messages in the queue.
148
+
149
+ ### Recover from failed events
150
+
151
+ If your endpoint fails to respond to a webhook request with a `2xx` response, WorkOS will automatically retry the event with exponential back-off for up to 3 days in production environments. If for some reason your endpoint is still unable to respond successfully to events during that period, the event will be considered failed, and we will no longer retry sending it. You can reconcile your data using our [Directory Sync endpoints](/reference/directory-sync) to update your data.
152
+
153
+ > In staging environments, WorkOS only retries failed webhooks for several minutes before giving up. You can, however, manually retry webhooks using the WorkOS Dashboard for these environments.
154
+
155
+ ### Handle out-of-sequence events
156
+
157
+ WorkOS does not guarantee that events are delivered in the same sequence that they are generated. For example, when syncing a directory you may receive:
158
+
159
+ - `dsync.group.created`
160
+ - `dsync.user.created`
161
+ - `dsync.group.user_added`
162
+
163
+ Your endpoint should handle cases when these events are delivered out of order. Each event includes the full payload of the objects involved, so you can perform an upsert using the payload data.
164
+
165
+ It is also possible that event data can be stale due to a retry of an older event being delivered after a newer event for the same object. Therefore, we recommend checking the timestamp of the incoming webhook data against the timestamp of the data in your system to ensure you do not overwrite your data with stale data. Each object in the payload includes a `created_at` field and an `updated_at` field.
166
+
167
+ ### Ignore duplicate events
168
+
169
+ It is possible to receive the same event more than once. WorkOS recommends that you handle webhook events using idempotent operations. One way of doing this is logging the ID of webhook events that you have processed and ignoring subsequent requests with the same ID.
170
+
171
+ ### Obfuscate your endpoint URL
172
+
173
+ A small security measure you can incorporate is to make your webhook endpoint difficult to guess. Including a token comprised of series of random numbers and letters to your endpoint URL can prevent malicious actors from easily guessing your endpoint. For example: `https://api.example.com/webhooks/n0dbga5x…` is much more difficult to guess than `https://api.example.com/webhooks`