@farmsdotmarket/openauth 0.4.4

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.

Potentially problematic release.


This version of @farmsdotmarket/openauth might be problematic. Click here for more details.

Files changed (266) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/commit.cjs +4 -0
  3. package/.changeset/config.json +11 -0
  4. package/.changeset/farms-openauth-release-0-4-3-farms-2.md +10 -0
  5. package/.changeset/popular-geese-reply.md +5 -0
  6. package/.changeset/stupid-boats-play.md +5 -0
  7. package/.changeset/ten-pans-invent.md +5 -0
  8. package/.github/CODE_OF_CONDUCT +15 -0
  9. package/.github/workflows/docs.yml +39 -0
  10. package/.github/workflows/format.yml +26 -0
  11. package/.github/workflows/release.yml +28 -0
  12. package/.github/workflows/test.yml +20 -0
  13. package/.prettierrc +3 -0
  14. package/CNAME +1 -0
  15. package/FARMS_RELEASE.md +82 -0
  16. package/LICENSE +22 -0
  17. package/PATCHES.md +32 -0
  18. package/README.md +311 -0
  19. package/bun.lockb +0 -0
  20. package/bunfig.toml +2 -0
  21. package/examples/README.md +28 -0
  22. package/examples/client/astro/.vscode/extensions.json +4 -0
  23. package/examples/client/astro/.vscode/launch.json +11 -0
  24. package/examples/client/astro/README.md +7 -0
  25. package/examples/client/astro/astro.config.mjs +10 -0
  26. package/examples/client/astro/package.json +15 -0
  27. package/examples/client/astro/public/favicon.svg +9 -0
  28. package/examples/client/astro/src/assets/astro.svg +1 -0
  29. package/examples/client/astro/src/assets/background.svg +1 -0
  30. package/examples/client/astro/src/auth.ts +23 -0
  31. package/examples/client/astro/src/components/Welcome.astro +209 -0
  32. package/examples/client/astro/src/env.d.ts +10 -0
  33. package/examples/client/astro/src/layouts/Layout.astro +22 -0
  34. package/examples/client/astro/src/middleware.ts +31 -0
  35. package/examples/client/astro/src/pages/callback.ts +19 -0
  36. package/examples/client/astro/src/pages/index.astro +11 -0
  37. package/examples/client/astro/tsconfig.json +5 -0
  38. package/examples/client/cloudflare-api/api.ts +80 -0
  39. package/examples/client/cloudflare-api/package.json +5 -0
  40. package/examples/client/jwt-api/CHANGELOG.md +8 -0
  41. package/examples/client/jwt-api/README.md +13 -0
  42. package/examples/client/jwt-api/index.ts +45 -0
  43. package/examples/client/jwt-api/package.json +15 -0
  44. package/examples/client/lambda-api/api.ts +69 -0
  45. package/examples/client/lambda-api/package.json +5 -0
  46. package/examples/client/nextjs/CHANGELOG.md +46 -0
  47. package/examples/client/nextjs/README.md +26 -0
  48. package/examples/client/nextjs/app/actions.ts +61 -0
  49. package/examples/client/nextjs/app/api/callback/route.ts +11 -0
  50. package/examples/client/nextjs/app/auth.ts +29 -0
  51. package/examples/client/nextjs/app/favicon.ico +0 -0
  52. package/examples/client/nextjs/app/globals.css +42 -0
  53. package/examples/client/nextjs/app/layout.tsx +32 -0
  54. package/examples/client/nextjs/app/page.module.css +169 -0
  55. package/examples/client/nextjs/app/page.tsx +97 -0
  56. package/examples/client/nextjs/next.config.ts +7 -0
  57. package/examples/client/nextjs/package.json +23 -0
  58. package/examples/client/nextjs/public/file.svg +1 -0
  59. package/examples/client/nextjs/public/globe.svg +1 -0
  60. package/examples/client/nextjs/public/next.svg +1 -0
  61. package/examples/client/nextjs/public/vercel.svg +1 -0
  62. package/examples/client/nextjs/public/window.svg +1 -0
  63. package/examples/client/nextjs/tsconfig.json +27 -0
  64. package/examples/client/react/README.md +29 -0
  65. package/examples/client/react/index.html +13 -0
  66. package/examples/client/react/package.json +30 -0
  67. package/examples/client/react/public/vite.svg +1 -0
  68. package/examples/client/react/src/App.tsx +39 -0
  69. package/examples/client/react/src/AuthContext.tsx +153 -0
  70. package/examples/client/react/src/assets/react.svg +1 -0
  71. package/examples/client/react/src/main.tsx +12 -0
  72. package/examples/client/react/src/vite-env.d.ts +1 -0
  73. package/examples/client/react/tsconfig.app.json +26 -0
  74. package/examples/client/react/tsconfig.json +11 -0
  75. package/examples/client/react/tsconfig.node.json +24 -0
  76. package/examples/client/react/vite.config.ts +7 -0
  77. package/examples/client/sveltekit/package.json +24 -0
  78. package/examples/client/sveltekit/src/app.d.ts +15 -0
  79. package/examples/client/sveltekit/src/app.html +12 -0
  80. package/examples/client/sveltekit/src/hooks.server.ts +29 -0
  81. package/examples/client/sveltekit/src/lib/auth.server.ts +29 -0
  82. package/examples/client/sveltekit/src/routes/+page.server.ts +5 -0
  83. package/examples/client/sveltekit/src/routes/+page.svelte +5 -0
  84. package/examples/client/sveltekit/src/routes/callback/+server.ts +17 -0
  85. package/examples/client/sveltekit/static/favicon.png +0 -0
  86. package/examples/client/sveltekit/svelte.config.js +18 -0
  87. package/examples/client/sveltekit/tsconfig.json +19 -0
  88. package/examples/client/sveltekit/vite.config.ts +6 -0
  89. package/examples/issuer/bun/issuer.ts +43 -0
  90. package/examples/issuer/bun/package.json +7 -0
  91. package/examples/issuer/cloudflare/issuer.ts +47 -0
  92. package/examples/issuer/cloudflare/package.json +8 -0
  93. package/examples/issuer/cloudflare/sst-env.d.ts +17 -0
  94. package/examples/issuer/cloudflare/sst.config.ts +23 -0
  95. package/examples/issuer/custom-frontend/auth/issuer.ts +43 -0
  96. package/examples/issuer/custom-frontend/auth/package.json +7 -0
  97. package/examples/issuer/custom-frontend/frontend/frontend.tsx +57 -0
  98. package/examples/issuer/custom-frontend/frontend/package.json +6 -0
  99. package/examples/issuer/custom-frontend/package.json +5 -0
  100. package/examples/issuer/lambda/issuer.ts +35 -0
  101. package/examples/issuer/lambda/package.json +8 -0
  102. package/examples/issuer/lambda/sst-env.d.ts +9 -0
  103. package/examples/issuer/lambda/sst.config.ts +15 -0
  104. package/examples/issuer/node/authorizer.ts +38 -0
  105. package/examples/issuer/node/package.json +5 -0
  106. package/examples/quickstart/sst/README.md +36 -0
  107. package/examples/quickstart/sst/app/actions.ts +62 -0
  108. package/examples/quickstart/sst/app/api/callback/route.ts +15 -0
  109. package/examples/quickstart/sst/app/auth.ts +29 -0
  110. package/examples/quickstart/sst/app/favicon.ico +0 -0
  111. package/examples/quickstart/sst/app/globals.css +42 -0
  112. package/examples/quickstart/sst/app/layout.tsx +32 -0
  113. package/examples/quickstart/sst/app/page.module.css +200 -0
  114. package/examples/quickstart/sst/app/page.tsx +53 -0
  115. package/examples/quickstart/sst/auth/index.ts +37 -0
  116. package/examples/quickstart/sst/auth/subjects.ts +8 -0
  117. package/examples/quickstart/sst/next.config.ts +7 -0
  118. package/examples/quickstart/sst/package-lock.json +1165 -0
  119. package/examples/quickstart/sst/package.json +26 -0
  120. package/examples/quickstart/sst/public/file.svg +1 -0
  121. package/examples/quickstart/sst/public/globe.svg +1 -0
  122. package/examples/quickstart/sst/public/next.svg +1 -0
  123. package/examples/quickstart/sst/public/vercel.svg +1 -0
  124. package/examples/quickstart/sst/public/window.svg +1 -0
  125. package/examples/quickstart/sst/sst-env.d.ts +18 -0
  126. package/examples/quickstart/sst/sst.config.ts +21 -0
  127. package/examples/quickstart/sst/tsconfig.json +27 -0
  128. package/examples/quickstart/standalone/README.md +36 -0
  129. package/examples/quickstart/standalone/app/actions.ts +62 -0
  130. package/examples/quickstart/standalone/app/api/callback/route.ts +15 -0
  131. package/examples/quickstart/standalone/app/auth.ts +28 -0
  132. package/examples/quickstart/standalone/app/favicon.ico +0 -0
  133. package/examples/quickstart/standalone/app/globals.css +42 -0
  134. package/examples/quickstart/standalone/app/layout.tsx +32 -0
  135. package/examples/quickstart/standalone/app/page.module.css +200 -0
  136. package/examples/quickstart/standalone/app/page.tsx +53 -0
  137. package/examples/quickstart/standalone/auth/index.ts +32 -0
  138. package/examples/quickstart/standalone/auth/subjects.ts +8 -0
  139. package/examples/quickstart/standalone/bun.lockb +0 -0
  140. package/examples/quickstart/standalone/next.config.ts +7 -0
  141. package/examples/quickstart/standalone/package.json +25 -0
  142. package/examples/quickstart/standalone/public/file.svg +1 -0
  143. package/examples/quickstart/standalone/public/globe.svg +1 -0
  144. package/examples/quickstart/standalone/public/next.svg +1 -0
  145. package/examples/quickstart/standalone/public/vercel.svg +1 -0
  146. package/examples/quickstart/standalone/public/window.svg +1 -0
  147. package/examples/quickstart/standalone/tsconfig.json +27 -0
  148. package/examples/subjects.ts +8 -0
  149. package/examples/tsconfig.json +10 -0
  150. package/package.json +23 -0
  151. package/packages/openauth/CHANGELOG.md +310 -0
  152. package/packages/openauth/bunfig.toml +2 -0
  153. package/packages/openauth/package.json +51 -0
  154. package/packages/openauth/script/build.ts +25 -0
  155. package/packages/openauth/src/client-native.ts +204 -0
  156. package/packages/openauth/src/client.ts +776 -0
  157. package/packages/openauth/src/css.d.ts +4 -0
  158. package/packages/openauth/src/error.ts +120 -0
  159. package/packages/openauth/src/index.ts +26 -0
  160. package/packages/openauth/src/issuer.ts +1156 -0
  161. package/packages/openauth/src/jwt.ts +17 -0
  162. package/packages/openauth/src/keys.ts +139 -0
  163. package/packages/openauth/src/pkce.ts +40 -0
  164. package/packages/openauth/src/provider/apple.ts +127 -0
  165. package/packages/openauth/src/provider/arctic.ts +66 -0
  166. package/packages/openauth/src/provider/code.ts +227 -0
  167. package/packages/openauth/src/provider/cognito.ts +74 -0
  168. package/packages/openauth/src/provider/discord.ts +45 -0
  169. package/packages/openauth/src/provider/facebook.ts +84 -0
  170. package/packages/openauth/src/provider/github.ts +45 -0
  171. package/packages/openauth/src/provider/google.ts +85 -0
  172. package/packages/openauth/src/provider/index.ts +3 -0
  173. package/packages/openauth/src/provider/jumpcloud.ts +45 -0
  174. package/packages/openauth/src/provider/keycloak.ts +75 -0
  175. package/packages/openauth/src/provider/linkedin.ts +12 -0
  176. package/packages/openauth/src/provider/microsoft.ts +100 -0
  177. package/packages/openauth/src/provider/oauth2.ts +297 -0
  178. package/packages/openauth/src/provider/oidc.ts +179 -0
  179. package/packages/openauth/src/provider/password.ts +672 -0
  180. package/packages/openauth/src/provider/provider.ts +33 -0
  181. package/packages/openauth/src/provider/slack.ts +67 -0
  182. package/packages/openauth/src/provider/spotify.ts +45 -0
  183. package/packages/openauth/src/provider/twitch.ts +45 -0
  184. package/packages/openauth/src/provider/x.ts +46 -0
  185. package/packages/openauth/src/provider/yahoo.ts +45 -0
  186. package/packages/openauth/src/random.ts +28 -0
  187. package/packages/openauth/src/storage/aws.ts +59 -0
  188. package/packages/openauth/src/storage/cloudflare.ts +77 -0
  189. package/packages/openauth/src/storage/dynamo.ts +193 -0
  190. package/packages/openauth/src/storage/memory.ts +135 -0
  191. package/packages/openauth/src/storage/storage.ts +46 -0
  192. package/packages/openauth/src/subject.ts +130 -0
  193. package/packages/openauth/src/ui/base.tsx +118 -0
  194. package/packages/openauth/src/ui/code.tsx +212 -0
  195. package/packages/openauth/src/ui/form.tsx +40 -0
  196. package/packages/openauth/src/ui/icon.tsx +95 -0
  197. package/packages/openauth/src/ui/password.tsx +403 -0
  198. package/packages/openauth/src/ui/select.tsx +221 -0
  199. package/packages/openauth/src/ui/theme.ts +319 -0
  200. package/packages/openauth/src/ui/ui.css +252 -0
  201. package/packages/openauth/src/util.ts +58 -0
  202. package/packages/openauth/test/client-native.test.ts +30 -0
  203. package/packages/openauth/test/client.test.ts +177 -0
  204. package/packages/openauth/test/issuer.test.ts +393 -0
  205. package/packages/openauth/test/scrap.test.ts +85 -0
  206. package/packages/openauth/test/storage.test.ts +94 -0
  207. package/packages/openauth/test/util.test.ts +103 -0
  208. package/packages/openauth/tsconfig.json +13 -0
  209. package/scripts/format +15 -0
  210. package/www/.vscode/extensions.json +4 -0
  211. package/www/.vscode/launch.json +11 -0
  212. package/www/README.md +55 -0
  213. package/www/astro.config.mjs +136 -0
  214. package/www/bun.lockb +0 -0
  215. package/www/config.ts +4 -0
  216. package/www/generate.ts +911 -0
  217. package/www/package.json +24 -0
  218. package/www/public/favicon-dark.svg +3 -0
  219. package/www/public/favicon.ico +0 -0
  220. package/www/public/favicon.svg +3 -0
  221. package/www/public/social-share.png +0 -0
  222. package/www/src/assets/logo-dark.svg +11 -0
  223. package/www/src/assets/logo-light.svg +11 -0
  224. package/www/src/components/Hero.astro +11 -0
  225. package/www/src/components/Lander.astro +176 -0
  226. package/www/src/content/config.ts +6 -0
  227. package/www/src/content/docs/docs/client.mdx +650 -0
  228. package/www/src/content/docs/docs/index.mdx +325 -0
  229. package/www/src/content/docs/docs/issuer.mdx +512 -0
  230. package/www/src/content/docs/docs/provider/apple.mdx +233 -0
  231. package/www/src/content/docs/docs/provider/code.mdx +163 -0
  232. package/www/src/content/docs/docs/provider/cognito.mdx +173 -0
  233. package/www/src/content/docs/docs/provider/discord.mdx +139 -0
  234. package/www/src/content/docs/docs/provider/facebook.mdx +233 -0
  235. package/www/src/content/docs/docs/provider/github.mdx +139 -0
  236. package/www/src/content/docs/docs/provider/google.mdx +233 -0
  237. package/www/src/content/docs/docs/provider/jumpcloud.mdx +139 -0
  238. package/www/src/content/docs/docs/provider/keycloak.mdx +176 -0
  239. package/www/src/content/docs/docs/provider/microsoft.mdx +252 -0
  240. package/www/src/content/docs/docs/provider/oauth2.mdx +173 -0
  241. package/www/src/content/docs/docs/provider/oidc.mdx +113 -0
  242. package/www/src/content/docs/docs/provider/password.mdx +237 -0
  243. package/www/src/content/docs/docs/provider/slack.mdx +157 -0
  244. package/www/src/content/docs/docs/provider/spotify.mdx +139 -0
  245. package/www/src/content/docs/docs/provider/twitch.mdx +139 -0
  246. package/www/src/content/docs/docs/provider/x.mdx +139 -0
  247. package/www/src/content/docs/docs/provider/yahoo.mdx +139 -0
  248. package/www/src/content/docs/docs/start/nextjs-dark.png +0 -0
  249. package/www/src/content/docs/docs/start/nextjs-light.png +0 -0
  250. package/www/src/content/docs/docs/start/sst.mdx +423 -0
  251. package/www/src/content/docs/docs/start/standalone.mdx +376 -0
  252. package/www/src/content/docs/docs/storage/cloudflare.mdx +63 -0
  253. package/www/src/content/docs/docs/storage/dynamo.mdx +127 -0
  254. package/www/src/content/docs/docs/storage/memory.mdx +77 -0
  255. package/www/src/content/docs/docs/subject.mdx +139 -0
  256. package/www/src/content/docs/docs/themes-dark.png +0 -0
  257. package/www/src/content/docs/docs/themes-light.png +0 -0
  258. package/www/src/content/docs/docs/ui/code.mdx +248 -0
  259. package/www/src/content/docs/docs/ui/password.mdx +410 -0
  260. package/www/src/content/docs/docs/ui/select.mdx +99 -0
  261. package/www/src/content/docs/docs/ui/theme.mdx +284 -0
  262. package/www/src/content/docs/index.mdx +12 -0
  263. package/www/src/custom.css +0 -0
  264. package/www/src/env.d.ts +2 -0
  265. package/www/src/styles/lander.css +15 -0
  266. package/www/tsconfig.json +3 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "www",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "scripts": {
6
+ "dev": "astro dev",
7
+ "start": "astro dev",
8
+ "build": "bun generate.ts && astro build",
9
+ "preview": "astro preview",
10
+ "astro": "astro"
11
+ },
12
+ "dependencies": {
13
+ "@astrojs/markdown-remark": "^6.0.1",
14
+ "@astrojs/starlight": "^0.32.0",
15
+ "@fontsource/ibm-plex-mono": "^5.1.0",
16
+ "astro": "^5.1.5",
17
+ "rehype-autolink-headings": "^7.1.0",
18
+ "sharp": "^0.33.4",
19
+ "toolbeam-docs-theme": "^0.0.3"
20
+ },
21
+ "devDependencies": {
22
+ "typedoc": "^0.27.5"
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ <svg width="50" height="51" viewBox="0 0 50 51" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 50.1285V0.12854H50V50.1285H0ZM3.07377 11.8089H11.6803V3.20231H3.07377V11.8089ZM14.8224 11.8089H23.429V3.20231H14.8224V11.8089ZM26.5027 11.8089H35.1093V3.20231H26.5027V11.8089ZM38.2514 11.8089H46.9262V3.20231H38.2514V11.8089ZM3.07377 23.5575H11.6803V14.9509H3.07377V23.5575ZM14.8224 23.5575H23.429V14.9509H14.8224V23.5575ZM26.5027 23.5575H35.1093V14.9509H26.5027V23.5575ZM38.2514 23.5575H46.9262V14.9509H38.2514V23.5575ZM3.07377 35.2378H11.6803V26.6313H3.07377V35.2378ZM14.8224 35.2378H23.429V26.6313H14.8224V35.2378ZM26.5027 35.2378H35.1093V26.6313H26.5027V35.2378ZM38.2514 35.2378H46.9262V26.6313H38.2514V35.2378ZM3.07377 47.0548H11.6803V38.3116H3.07377V47.0548ZM14.8224 47.0548H23.429V38.3116H14.8224V47.0548ZM26.5027 47.0548H35.1093V38.3116H26.5027V47.0548ZM38.2514 47.0548H46.9262V38.3116H38.2514V47.0548Z" fill="white"/>
3
+ </svg>
Binary file
@@ -0,0 +1,3 @@
1
+ <svg width="50" height="51" viewBox="0 0 50 51" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 50.1285V0.12854H50V50.1285H0ZM3.07377 11.8089H11.6803V3.20231H3.07377V11.8089ZM14.8224 11.8089H23.429V3.20231H14.8224V11.8089ZM26.5027 11.8089H35.1093V3.20231H26.5027V11.8089ZM38.2514 11.8089H46.9262V3.20231H38.2514V11.8089ZM3.07377 23.5575H11.6803V14.9509H3.07377V23.5575ZM14.8224 23.5575H23.429V14.9509H14.8224V23.5575ZM26.5027 23.5575H35.1093V14.9509H26.5027V23.5575ZM38.2514 23.5575H46.9262V14.9509H38.2514V23.5575ZM3.07377 35.2378H11.6803V26.6313H3.07377V35.2378ZM14.8224 35.2378H23.429V26.6313H14.8224V35.2378ZM26.5027 35.2378H35.1093V26.6313H26.5027V35.2378ZM38.2514 35.2378H46.9262V26.6313H38.2514V35.2378ZM3.07377 47.0548H11.6803V38.3116H3.07377V47.0548ZM14.8224 47.0548H23.429V38.3116H14.8224V47.0548ZM26.5027 47.0548H35.1093V38.3116H26.5027V47.0548ZM38.2514 47.0548H46.9262V38.3116H38.2514V47.0548Z" fill="black"/>
3
+ </svg>
Binary file
@@ -0,0 +1,11 @@
1
+ <svg width="400" height="63" viewBox="0 0 400 63" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M391.92 29.0813H375.182V51.2302H367.101V0.872009H375.182V22.2995H391.92V0.872009H400V51.2302H391.92V29.0813Z" fill="white"/>
3
+ <path d="M344.331 7.65378V51.2302H336.251V7.65378H320.451V0.872009H360.131V7.65378H344.331Z" fill="white"/>
4
+ <path d="M288.829 1.12851V31.4012C288.829 33.4241 288.878 35.2588 288.976 36.9054C289.124 38.5519 289.492 39.9632 290.082 41.1393C290.672 42.2684 291.557 43.1387 292.737 43.7502C293.917 44.3618 295.539 44.6676 297.604 44.6676C299.669 44.6676 301.291 44.3618 302.471 43.7502C303.651 43.1387 304.536 42.2684 305.126 41.1393C305.716 39.9632 306.06 38.5519 306.158 36.9054C306.306 35.2588 306.38 33.4241 306.38 31.4012V1.12851H314.639V29.9899C314.639 33.5182 314.418 36.6231 313.975 39.3046C313.582 41.9391 312.771 44.1501 311.542 45.9378C310.313 47.6784 308.567 48.9956 306.306 49.8895C304.094 50.7833 301.193 51.2302 297.604 51.2302C294.015 51.2302 291.09 50.7833 288.829 49.8895C286.616 48.9956 284.896 47.6784 283.667 45.9378C282.438 44.1501 281.602 41.9391 281.16 39.3046C280.766 36.6231 280.57 33.5182 280.57 29.9899V1.12851H288.829Z" fill="white"/>
5
+ <path d="M265.459 51.2302L261.635 37.811H245.619L241.795 51.2302H233.57L248.288 0.872009H259.327L274.044 51.2302H265.459ZM253.916 9.02456H253.338L247.134 31.1014H260.12L253.916 9.02456Z" fill="white"/>
6
+ <path d="M218.619 51.2303C218.09 51.2303 217.826 50.9657 217.826 50.4366V27.7827C217.826 25.5702 217.369 23.9589 216.455 22.9488C215.589 21.8907 214.219 21.3616 212.343 21.3616C210.563 21.3616 208.808 21.8907 207.076 22.9488C205.345 23.9589 203.276 25.6664 200.871 28.0712L200.727 22.2274C202.266 20.5921 203.757 19.2453 205.2 18.1872C206.643 17.129 208.11 16.3354 209.601 15.8063C211.14 15.2773 212.752 15.0127 214.435 15.0127C217.898 15.0127 220.519 16.0228 222.299 18.0429C224.127 20.0149 225.04 22.9969 225.04 26.989V50.4366C225.04 50.9657 224.8 51.2303 224.319 51.2303H218.619ZM195.749 51.2303C195.22 51.2303 194.955 50.9657 194.955 50.4366V24.8246C194.955 23.4779 194.883 22.059 194.739 20.568C194.643 19.0289 194.547 17.8024 194.45 16.8885C194.354 16.2152 194.619 15.8785 195.244 15.8785H200.366C200.847 15.8785 201.136 16.119 201.232 16.5999C201.328 17.0328 201.425 17.634 201.521 18.4036C201.617 19.1732 201.713 19.9908 201.809 20.8566C201.906 21.7223 201.954 22.4679 201.954 23.0931L202.17 25.4018V50.4366C202.17 50.9657 201.906 51.2303 201.376 51.2303H195.749Z" fill="white"/>
7
+ <path d="M171.458 51.2302C166.484 51.2302 162.705 50.0943 160.121 47.8225C157.585 45.5507 156.317 42.1677 156.317 37.6735V27.8208C156.317 23.0303 157.585 19.4004 160.121 16.931C162.656 14.4123 166.411 13.1529 171.384 13.1529C176.309 13.1529 180.04 14.3629 182.575 16.7829C185.111 19.2028 186.378 22.734 186.378 27.3764V33.1546C186.378 33.6979 186.135 33.9695 185.647 33.9695H163.631V36.3401C163.631 39.3527 164.265 41.5504 165.533 42.9332C166.801 44.3161 168.849 45.0075 171.677 45.0075C173.823 45.0075 175.48 44.6618 176.651 43.9703C177.821 43.2789 178.406 42.2171 178.406 40.7849C178.406 40.2416 178.699 39.97 179.284 39.97H184.916C185.354 39.97 185.623 40.2169 185.72 40.7108C185.915 44.0197 184.745 46.6125 182.209 48.4893C179.674 50.3166 176.09 51.2302 171.458 51.2302ZM163.631 28.3394H179.137V27.969C179.137 25.0058 178.504 22.8328 177.236 21.4499C175.968 20.0671 174.042 19.3757 171.458 19.3757C168.825 19.3757 166.85 20.0918 165.533 21.524C164.265 22.9562 163.631 25.1046 163.631 27.969V28.3394Z" fill="white"/>
8
+ <path d="M134.895 50.2362C133.164 50.2362 131.312 49.9957 129.34 49.5147C127.368 49.0819 125.757 48.4566 124.506 47.6389L124.362 41.7229C125.66 42.4444 127.103 43.0216 128.691 43.4544C130.278 43.8392 131.745 44.0316 133.091 44.0316C135.689 44.0316 137.565 43.2861 138.719 41.7951C139.921 40.2559 140.523 37.9713 140.523 34.9412V27.1493C140.523 24.504 140.066 22.5801 139.152 21.3776C138.238 20.1271 136.843 19.5018 134.967 19.5018C133.38 19.5018 131.769 19.9828 130.133 20.9447C128.498 21.8586 126.454 23.4458 124.001 25.7064L123.785 19.6461C125.324 18.2032 126.791 17.0007 128.186 16.0388C129.58 15.0768 130.999 14.3554 132.442 13.8744C133.885 13.3934 135.424 13.1529 137.06 13.1529C140.571 13.1529 143.216 14.2351 144.996 16.3995C146.823 18.5639 147.737 21.8586 147.737 26.2836V35.7348C147.737 40.4964 146.631 44.1038 144.418 46.5567C142.254 49.0097 139.08 50.2362 134.895 50.2362ZM119.023 62.7175C118.494 62.7175 118.229 62.453 118.229 61.9239V22.3877C118.229 21.1852 118.181 19.9106 118.085 18.5639C117.989 17.2172 117.869 16.0147 117.724 14.9566C117.676 14.3313 117.941 14.0187 118.518 14.0187H123.64C124.169 14.0187 124.458 14.2592 124.506 14.7401C124.602 15.1249 124.698 15.63 124.795 16.2552C124.891 16.8805 124.963 17.5058 125.011 18.131C125.059 18.7082 125.083 19.1411 125.083 19.4297L125.444 23.2534V61.9239C125.444 62.453 125.179 62.7175 124.65 62.7175H119.023Z" fill="white"/>
9
+ <path d="M89.8407 51.2302C83.6842 51.2302 79.0668 49.7053 75.9886 46.6554C72.9584 43.5563 71.4434 39.1783 71.4434 33.5212V18.8375C71.4434 13.1313 72.9584 8.75322 75.9886 5.70334C79.0668 2.65345 83.6842 1.12851 89.8407 1.12851C95.9972 1.12851 100.591 2.65345 103.621 5.70334C106.699 8.75322 108.238 13.1313 108.238 18.8375V33.5212C108.238 39.1783 106.699 43.5563 103.621 46.6554C100.591 49.7053 95.9972 51.2302 89.8407 51.2302ZM89.8407 44.6631C93.4961 44.6631 96.2617 43.7039 98.1376 41.7854C100.013 39.8178 100.951 36.9892 100.951 33.2999V19.0589C100.951 15.3203 100.013 12.4918 98.1376 10.5733C96.2617 8.65484 93.4961 7.6956 89.8407 7.6956C86.2334 7.6956 83.4678 8.65484 81.5439 10.5733C79.6681 12.4918 78.7302 15.3203 78.7302 19.0589V33.2999C78.7302 36.9892 79.6681 39.8178 81.5439 41.7854C83.4678 43.7039 86.2334 44.6631 89.8407 44.6631Z" fill="white"/>
10
+ <path d="M0 51.2302V1.12851H50.1017V51.2302H0ZM3.08002 12.8326H11.7041V4.20853H3.08002V12.8326ZM14.8526 12.8326H23.4766V4.20853H14.8526V12.8326ZM26.5566 12.8326H35.1807V4.20853H26.5566V12.8326ZM38.3292 12.8326H47.0217V4.20853H38.3292V12.8326ZM3.08002 24.6051H11.7041V15.9811H3.08002V24.6051ZM14.8526 24.6051H23.4766V15.9811H14.8526V24.6051ZM26.5566 24.6051H35.1807V15.9811H26.5566V24.6051ZM38.3292 24.6051H47.0217V15.9811H38.3292V24.6051ZM3.08002 36.3092H11.7041V27.6852H3.08002V36.3092ZM14.8526 36.3092H23.4766V27.6852H14.8526V36.3092ZM26.5566 36.3092H35.1807V27.6852H26.5566V36.3092ZM38.3292 36.3092H47.0217V27.6852H38.3292V36.3092ZM3.08002 48.1502H11.7041V39.3892H3.08002V48.1502ZM14.8526 48.1502H23.4766V39.3892H14.8526V48.1502ZM26.5566 48.1502H35.1807V39.3892H26.5566V48.1502ZM38.3292 48.1502H47.0217V39.3892H38.3292V48.1502Z" fill="white"/>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="400" height="63" viewBox="0 0 400 63" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M391.92 29.0813H375.182V51.2302H367.101V0.872009H375.182V22.2995H391.92V0.872009H400V51.2302H391.92V29.0813Z" fill="black"/>
3
+ <path d="M344.331 7.65378V51.2302H336.251V7.65378H320.451V0.872009H360.131V7.65378H344.331Z" fill="black"/>
4
+ <path d="M288.829 1.12851V31.4012C288.829 33.4241 288.878 35.2588 288.976 36.9054C289.124 38.5519 289.492 39.9632 290.082 41.1393C290.672 42.2684 291.557 43.1387 292.737 43.7502C293.917 44.3618 295.539 44.6676 297.604 44.6676C299.669 44.6676 301.291 44.3618 302.471 43.7502C303.651 43.1387 304.536 42.2684 305.126 41.1393C305.716 39.9632 306.06 38.5519 306.158 36.9054C306.306 35.2588 306.38 33.4241 306.38 31.4012V1.12851H314.639V29.9899C314.639 33.5182 314.418 36.6231 313.975 39.3046C313.582 41.9391 312.771 44.1501 311.542 45.9378C310.313 47.6784 308.567 48.9956 306.306 49.8895C304.094 50.7833 301.193 51.2302 297.604 51.2302C294.015 51.2302 291.09 50.7833 288.829 49.8895C286.616 48.9956 284.896 47.6784 283.667 45.9378C282.438 44.1501 281.602 41.9391 281.16 39.3046C280.766 36.6231 280.57 33.5182 280.57 29.9899V1.12851H288.829Z" fill="black"/>
5
+ <path d="M265.459 51.2302L261.635 37.811H245.619L241.795 51.2302H233.57L248.288 0.872009H259.327L274.044 51.2302H265.459ZM253.916 9.02456H253.338L247.134 31.1014H260.12L253.916 9.02456Z" fill="black"/>
6
+ <path d="M218.619 51.2303C218.09 51.2303 217.826 50.9657 217.826 50.4366V27.7827C217.826 25.5702 217.369 23.9589 216.455 22.9488C215.589 21.8907 214.219 21.3616 212.343 21.3616C210.563 21.3616 208.808 21.8907 207.076 22.9488C205.345 23.9589 203.276 25.6664 200.871 28.0712L200.727 22.2274C202.266 20.5921 203.757 19.2453 205.2 18.1872C206.643 17.129 208.11 16.3354 209.601 15.8063C211.14 15.2773 212.752 15.0127 214.435 15.0127C217.898 15.0127 220.519 16.0228 222.299 18.0429C224.127 20.0149 225.04 22.9969 225.04 26.989V50.4366C225.04 50.9657 224.8 51.2303 224.319 51.2303H218.619ZM195.749 51.2303C195.22 51.2303 194.955 50.9657 194.955 50.4366V24.8246C194.955 23.4779 194.883 22.059 194.739 20.568C194.643 19.0289 194.547 17.8024 194.45 16.8885C194.354 16.2152 194.619 15.8785 195.244 15.8785H200.366C200.847 15.8785 201.136 16.119 201.232 16.5999C201.328 17.0328 201.425 17.634 201.521 18.4036C201.617 19.1732 201.713 19.9908 201.809 20.8566C201.906 21.7223 201.954 22.4679 201.954 23.0931L202.17 25.4018V50.4366C202.17 50.9657 201.906 51.2303 201.376 51.2303H195.749Z" fill="black"/>
7
+ <path d="M171.458 51.2302C166.484 51.2302 162.705 50.0943 160.121 47.8225C157.585 45.5507 156.317 42.1677 156.317 37.6735V27.8208C156.317 23.0303 157.585 19.4004 160.121 16.931C162.656 14.4123 166.411 13.1529 171.384 13.1529C176.309 13.1529 180.04 14.3629 182.575 16.7829C185.111 19.2028 186.378 22.734 186.378 27.3764V33.1546C186.378 33.6979 186.135 33.9695 185.647 33.9695H163.631V36.3401C163.631 39.3527 164.265 41.5504 165.533 42.9332C166.801 44.3161 168.849 45.0075 171.677 45.0075C173.823 45.0075 175.48 44.6618 176.651 43.9703C177.821 43.2789 178.406 42.2171 178.406 40.7849C178.406 40.2416 178.699 39.97 179.284 39.97H184.916C185.354 39.97 185.623 40.2169 185.72 40.7108C185.915 44.0197 184.745 46.6125 182.209 48.4893C179.674 50.3166 176.09 51.2302 171.458 51.2302ZM163.631 28.3394H179.137V27.969C179.137 25.0058 178.504 22.8328 177.236 21.4499C175.968 20.0671 174.042 19.3757 171.458 19.3757C168.825 19.3757 166.85 20.0918 165.533 21.524C164.265 22.9562 163.631 25.1046 163.631 27.969V28.3394Z" fill="black"/>
8
+ <path d="M134.895 50.2362C133.164 50.2362 131.312 49.9957 129.34 49.5147C127.368 49.0819 125.757 48.4566 124.506 47.6389L124.362 41.7229C125.66 42.4444 127.103 43.0216 128.691 43.4544C130.278 43.8392 131.745 44.0316 133.091 44.0316C135.689 44.0316 137.565 43.2861 138.719 41.7951C139.921 40.2559 140.523 37.9713 140.523 34.9412V27.1493C140.523 24.504 140.066 22.5801 139.152 21.3776C138.238 20.1271 136.843 19.5018 134.967 19.5018C133.38 19.5018 131.769 19.9828 130.133 20.9447C128.498 21.8586 126.454 23.4458 124.001 25.7064L123.785 19.6461C125.324 18.2032 126.791 17.0007 128.186 16.0388C129.58 15.0768 130.999 14.3554 132.442 13.8744C133.885 13.3934 135.424 13.1529 137.06 13.1529C140.571 13.1529 143.216 14.2351 144.996 16.3995C146.823 18.5639 147.737 21.8586 147.737 26.2836V35.7348C147.737 40.4964 146.631 44.1038 144.418 46.5567C142.254 49.0097 139.08 50.2362 134.895 50.2362ZM119.023 62.7175C118.494 62.7175 118.229 62.453 118.229 61.9239V22.3877C118.229 21.1852 118.181 19.9106 118.085 18.5639C117.989 17.2172 117.869 16.0147 117.724 14.9566C117.676 14.3313 117.941 14.0187 118.518 14.0187H123.64C124.169 14.0187 124.458 14.2592 124.506 14.7401C124.602 15.1249 124.698 15.63 124.795 16.2552C124.891 16.8805 124.963 17.5058 125.011 18.131C125.059 18.7082 125.083 19.1411 125.083 19.4297L125.444 23.2534V61.9239C125.444 62.453 125.179 62.7175 124.65 62.7175H119.023Z" fill="black"/>
9
+ <path d="M89.8407 51.2302C83.6842 51.2302 79.0668 49.7053 75.9886 46.6554C72.9584 43.5563 71.4434 39.1783 71.4434 33.5212V18.8375C71.4434 13.1313 72.9584 8.75322 75.9886 5.70334C79.0668 2.65345 83.6842 1.12851 89.8407 1.12851C95.9972 1.12851 100.591 2.65345 103.621 5.70334C106.699 8.75322 108.238 13.1313 108.238 18.8375V33.5212C108.238 39.1783 106.699 43.5563 103.621 46.6554C100.591 49.7053 95.9972 51.2302 89.8407 51.2302ZM89.8407 44.6631C93.4961 44.6631 96.2617 43.7039 98.1376 41.7854C100.013 39.8178 100.951 36.9892 100.951 33.2999V19.0589C100.951 15.3203 100.013 12.4918 98.1376 10.5733C96.2617 8.65484 93.4961 7.6956 89.8407 7.6956C86.2334 7.6956 83.4678 8.65484 81.5439 10.5733C79.6681 12.4918 78.7302 15.3203 78.7302 19.0589V33.2999C78.7302 36.9892 79.6681 39.8178 81.5439 41.7854C83.4678 43.7039 86.2334 44.6631 89.8407 44.6631Z" fill="black"/>
10
+ <path d="M0 51.2302V1.12851H50.1017V51.2302H0ZM3.08002 12.8326H11.7041V4.20853H3.08002V12.8326ZM14.8526 12.8326H23.4766V4.20853H14.8526V12.8326ZM26.5566 12.8326H35.1807V4.20853H26.5566V12.8326ZM38.3292 12.8326H47.0217V4.20853H38.3292V12.8326ZM3.08002 24.6051H11.7041V15.9811H3.08002V24.6051ZM14.8526 24.6051H23.4766V15.9811H14.8526V24.6051ZM26.5566 24.6051H35.1807V15.9811H26.5566V24.6051ZM38.3292 24.6051H47.0217V15.9811H38.3292V24.6051ZM3.08002 36.3092H11.7041V27.6852H3.08002V36.3092ZM14.8526 36.3092H23.4766V27.6852H14.8526V36.3092ZM26.5566 36.3092H35.1807V27.6852H26.5566V36.3092ZM38.3292 36.3092H47.0217V27.6852H38.3292V36.3092ZM3.08002 48.1502H11.7041V39.3892H3.08002V48.1502ZM14.8526 48.1502H23.4766V39.3892H14.8526V48.1502ZM26.5566 48.1502H35.1807V39.3892H26.5566V48.1502ZM38.3292 48.1502H47.0217V39.3892H38.3292V48.1502Z" fill="black"/>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ ---
2
+ import Default from '@astrojs/starlight/components/Hero.astro';
3
+ import Lander from './Lander.astro';
4
+
5
+ const { slug } = Astro.locals.starlightRoute.entry;
6
+ ---
7
+
8
+ { slug === ""
9
+ ? <Lander {...Astro.props} />
10
+ : <Default {...Astro.props}><slot /></Default>
11
+ }
@@ -0,0 +1,176 @@
1
+ ---
2
+ import { Image } from 'astro:assets';
3
+ import config from "virtual:starlight/user-config";
4
+ import type { Props } from '@astrojs/starlight/props';
5
+
6
+ const { data } = Astro.locals.starlightRoute.entry;
7
+ const { title = data.title, tagline, image, actions = [] } = data.hero || {};
8
+
9
+ const imageAttrs = {
10
+ loading: 'eager' as const,
11
+ decoding: 'async' as const,
12
+ width: 400,
13
+ alt: image?.alt || '',
14
+ };
15
+
16
+ let darkImage: ImageMetadata | undefined;
17
+ let lightImage: ImageMetadata | undefined;
18
+ let rawHtml: string | undefined;
19
+ if (image) {
20
+ if ('file' in image) {
21
+ darkImage = image.file;
22
+ } else if ('dark' in image) {
23
+ darkImage = image.dark;
24
+ lightImage = image.light;
25
+ } else {
26
+ rawHtml = image.html;
27
+ }
28
+ }
29
+ ---
30
+ <div class="hero">
31
+ <section class="top">
32
+ <div class="logo">
33
+ <Image
34
+ src={darkImage}
35
+ {...imageAttrs}
36
+ class:list={{ 'light:sl-hidden': Boolean(lightImage) }}
37
+ />
38
+ <Image src={lightImage} {...imageAttrs} class="dark:sl-hidden" />
39
+ </div>
40
+ <h1>Universal, standards-based auth provider.</h1>
41
+ </section>
42
+
43
+ <section class="cta">
44
+ <div class="col1">
45
+ <a href="https://www.youtube.com/watch?v=SSjNUuQ06tk" target="_blank">Learn more</a>
46
+ </div>
47
+ <div class="col2">
48
+ <a href="/docs/">View the docs</a>
49
+ </div>
50
+ <div class="col3">
51
+ <a href={config.social.github.url}>Star on GitHub</a>
52
+ </div>
53
+ </section>
54
+
55
+ <section class="content">
56
+ <ul>
57
+ <li><b>Universal</b>: You can deploy it as a standalone service or embed it into an existing application. It works with any framework or platform.</li>
58
+ <li><b>Self-hosted</b>: It runs entirely on your infrastructure and can be deployed on Node.js, Bun, AWS Lambda, or Cloudflare Workers.</li>
59
+ <li><b>Standards-based</b>: It implements the OAuth 2.0 spec and is based on web standards. So any OAuth client can use it.</li>
60
+ <li><b>Customizable</b>: It comes with prebuilt themeable UI that you can customize or opt out of.</li>
61
+ </ul>
62
+ </section>
63
+
64
+ <section class="footer">
65
+ <div class="col1">
66
+ <span>Version: Beta</span>
67
+ </div>
68
+ <div class="col2">
69
+ <span>Author: <a href="https://sst.dev">SST</a></span>
70
+ </div>
71
+ </section>
72
+ </div>
73
+
74
+ <style>
75
+ .hero {
76
+ --padding: 3rem;
77
+ --vertical-padding: 2rem;
78
+ --heading-font-size: var(--sl-text-3xl);
79
+
80
+ margin: 1rem;
81
+ border: 2px solid var(--sl-color-white);
82
+ }
83
+ @media (max-width: 30rem) {
84
+ .hero {
85
+ --padding: 1rem;
86
+ --vertical-padding: 1rem;
87
+ --heading-font-size: var(--sl-text-2xl);
88
+
89
+ margin: 0.5rem;
90
+ }
91
+ }
92
+
93
+ section.top {
94
+ padding: var(--padding);
95
+
96
+ h1 {
97
+ margin-top: calc(var(--vertical-padding) / 8);
98
+ font-size: var(--heading-font-size);
99
+ line-height: 1.25;
100
+ text-transform: uppercase;
101
+ }
102
+
103
+ img {
104
+ height: auto;
105
+ width: clamp(200px, 70vw, 400px);
106
+ }
107
+ }
108
+
109
+ section.cta {
110
+ display: flex;
111
+ flex-direction: row;
112
+ justify-content: space-between;
113
+ border-top: 2px solid var(--sl-color-white);
114
+
115
+ & > div {
116
+ flex: 1;
117
+ line-height: 1.4;
118
+ text-align: center;
119
+ text-transform: uppercase;
120
+ padding: calc(var(--padding) / 2) 0.5rem;
121
+ }
122
+
123
+ @media (max-width: 30rem) {
124
+ & > div {
125
+ padding-bottom: calc(var(--padding) / 2 + 4px);
126
+ }
127
+ }
128
+
129
+ & > div + div {
130
+ border-left: 2px solid var(--sl-color-white);
131
+ }
132
+ }
133
+
134
+ section.content {
135
+ border-top: 2px solid var(--sl-color-white);
136
+ padding: var(--padding);
137
+
138
+ ul {
139
+ padding-left: 1rem;
140
+
141
+ li + li {
142
+ margin-top: calc(var(--vertical-padding) / 2);
143
+ }
144
+
145
+ li b {
146
+ text-transform: uppercase;
147
+ }
148
+ }
149
+ }
150
+
151
+ section.approach {
152
+ border-top: 2px solid var(--sl-color-white);
153
+ padding: var(--padding);
154
+
155
+ p + p {
156
+ margin-top: var(--vertical-padding);
157
+ }
158
+ }
159
+
160
+ section.footer {
161
+ border-top: 2px solid var(--sl-color-white);
162
+ display: flex;
163
+ flex-direction: row;
164
+
165
+ & > div {
166
+ flex: 1;
167
+ text-align: center;
168
+ text-transform: uppercase;
169
+ padding: calc(var(--padding) / 2) 0.5rem;
170
+ }
171
+
172
+ & > div + div {
173
+ border-left: 2px solid var(--sl-color-white);
174
+ }
175
+ }
176
+ </style>
@@ -0,0 +1,6 @@
1
+ import { defineCollection } from "astro:content"
2
+ import { docsSchema } from "@astrojs/starlight/schema"
3
+
4
+ export const collections = {
5
+ docs: defineCollection({ schema: docsSchema() }),
6
+ }