@atproto/oauth-provider 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/account/account-manager.d.ts +2 -2
  3. package/dist/account/account-manager.d.ts.map +1 -1
  4. package/dist/account/account-manager.js.map +1 -1
  5. package/dist/account/account-store.d.ts +19 -6
  6. package/dist/account/account-store.d.ts.map +1 -1
  7. package/dist/account/account-store.js +16 -1
  8. package/dist/account/account-store.js.map +1 -1
  9. package/dist/assets/app/bundle-manifest.json +3 -3
  10. package/dist/assets/app/main.css +1 -1
  11. package/dist/assets/app/main.js +3 -3
  12. package/dist/assets/app/main.js.map +1 -1
  13. package/dist/client/client-auth.d.ts.map +1 -1
  14. package/dist/client/client-auth.js +2 -2
  15. package/dist/client/client-auth.js.map +1 -1
  16. package/dist/client/client-manager.d.ts.map +1 -1
  17. package/dist/client/client-manager.js +3 -1
  18. package/dist/client/client-manager.js.map +1 -1
  19. package/dist/client/client.d.ts.map +1 -1
  20. package/dist/client/client.js +3 -3
  21. package/dist/client/client.js.map +1 -1
  22. package/dist/dpop/dpop-manager.d.ts.map +1 -1
  23. package/dist/dpop/dpop-manager.js +3 -3
  24. package/dist/dpop/dpop-manager.js.map +1 -1
  25. package/dist/errors/invalid-token-error.d.ts.map +1 -1
  26. package/dist/errors/invalid-token-error.js +3 -2
  27. package/dist/errors/invalid-token-error.js.map +1 -1
  28. package/dist/errors/second-authentication-factor-required-error.d.ts +13 -0
  29. package/dist/errors/second-authentication-factor-required-error.d.ts.map +1 -0
  30. package/dist/errors/second-authentication-factor-required-error.js +23 -0
  31. package/dist/errors/second-authentication-factor-required-error.js.map +1 -0
  32. package/dist/lib/util/authorization-header.js +1 -1
  33. package/dist/lib/util/authorization-header.js.map +1 -1
  34. package/dist/metadata/build-metadata.d.ts.map +1 -1
  35. package/dist/metadata/build-metadata.js +2 -0
  36. package/dist/metadata/build-metadata.js.map +1 -1
  37. package/dist/oauth-errors.d.ts +1 -0
  38. package/dist/oauth-errors.d.ts.map +1 -1
  39. package/dist/oauth-errors.js +3 -1
  40. package/dist/oauth-errors.js.map +1 -1
  41. package/dist/oauth-provider.d.ts +101 -4
  42. package/dist/oauth-provider.d.ts.map +1 -1
  43. package/dist/oauth-provider.js +98 -110
  44. package/dist/oauth-provider.js.map +1 -1
  45. package/dist/output/{send-authorize-page.d.ts → build-authorize-data.d.ts} +2 -5
  46. package/dist/output/build-authorize-data.d.ts.map +1 -0
  47. package/dist/output/build-authorize-data.js +22 -0
  48. package/dist/output/build-authorize-data.js.map +1 -0
  49. package/dist/output/build-error-payload.d.ts.map +1 -1
  50. package/dist/output/build-error-payload.js +4 -3
  51. package/dist/output/build-error-payload.js.map +1 -1
  52. package/dist/output/customization.d.ts +2 -12
  53. package/dist/output/customization.d.ts.map +1 -1
  54. package/dist/output/customization.js +59 -32
  55. package/dist/output/customization.js.map +1 -1
  56. package/dist/output/output-manager.d.ts +16 -0
  57. package/dist/output/output-manager.d.ts.map +1 -0
  58. package/dist/output/output-manager.js +69 -0
  59. package/dist/output/output-manager.js.map +1 -0
  60. package/dist/output/send-web-page.d.ts +1 -1
  61. package/dist/output/send-web-page.d.ts.map +1 -1
  62. package/dist/output/send-web-page.js +3 -2
  63. package/dist/output/send-web-page.js.map +1 -1
  64. package/package.json +6 -6
  65. package/src/account/account-manager.ts +2 -2
  66. package/src/account/account-store.ts +12 -6
  67. package/src/assets/app/components/accept-form.tsx +86 -83
  68. package/src/assets/app/components/account-picker.tsx +98 -79
  69. package/src/assets/app/components/button.tsx +34 -0
  70. package/src/assets/app/components/client-identifier.tsx +12 -13
  71. package/src/assets/app/components/fieldset.tsx +26 -0
  72. package/src/assets/app/components/form-card.tsx +47 -0
  73. package/src/assets/app/components/help-card.tsx +1 -1
  74. package/src/assets/app/components/icons/alert-icon.tsx +5 -0
  75. package/src/assets/app/components/icons/at-symbol-icon.tsx +5 -0
  76. package/src/assets/app/components/icons/caret-right-icon.tsx +5 -0
  77. package/src/assets/app/components/icons/lock-icon.tsx +5 -0
  78. package/src/assets/app/components/icons/token-icon.tsx +5 -0
  79. package/src/assets/app/components/icons/util.tsx +17 -0
  80. package/src/assets/app/components/info-card.tsx +45 -0
  81. package/src/assets/app/components/input-checkbox.tsx +47 -0
  82. package/src/assets/app/components/input-container.tsx +37 -0
  83. package/src/assets/app/components/input-layout.tsx +47 -0
  84. package/src/assets/app/components/input-text.tsx +69 -0
  85. package/src/assets/app/components/layout-title-page.tsx +33 -16
  86. package/src/assets/app/components/layout-welcome.tsx +30 -14
  87. package/src/assets/app/components/sign-in-form.tsx +214 -196
  88. package/src/assets/app/components/sign-up-account-form.tsx +101 -117
  89. package/src/assets/app/components/sign-up-disclaimer.tsx +1 -1
  90. package/src/assets/app/hooks/use-api.ts +2 -0
  91. package/src/assets/app/lib/api.ts +49 -14
  92. package/src/assets/app/lib/clsx.ts +6 -1
  93. package/src/assets/app/lib/util.ts +3 -0
  94. package/src/assets/app/main.css +2 -1
  95. package/src/assets/app/views/accept-view.tsx +4 -3
  96. package/src/assets/app/views/authorize-view.tsx +8 -4
  97. package/src/assets/app/views/error-view.tsx +24 -15
  98. package/src/assets/app/views/sign-in-view.tsx +5 -15
  99. package/src/assets/app/views/sign-up-view.tsx +3 -10
  100. package/src/assets/app/views/welcome-view.tsx +11 -18
  101. package/src/client/client-auth.ts +3 -2
  102. package/src/client/client-manager.ts +2 -1
  103. package/src/client/client.ts +3 -1
  104. package/src/dpop/dpop-manager.ts +3 -2
  105. package/src/errors/invalid-token-error.ts +3 -1
  106. package/src/errors/second-authentication-factor-required-error.ts +25 -0
  107. package/src/lib/util/authorization-header.ts +1 -1
  108. package/src/metadata/build-metadata.ts +3 -0
  109. package/src/oauth-errors.ts +1 -0
  110. package/src/oauth-provider.ts +110 -99
  111. package/src/output/{send-authorize-page.ts → build-authorize-data.ts} +3 -43
  112. package/src/output/build-error-payload.ts +3 -1
  113. package/src/output/customization.ts +67 -45
  114. package/src/output/output-manager.ts +87 -0
  115. package/src/output/send-web-page.ts +4 -3
  116. package/tailwind.config.js +14 -1
  117. package/dist/output/send-authorize-page.d.ts.map +0 -1
  118. package/dist/output/send-authorize-page.js +0 -49
  119. package/dist/output/send-authorize-page.js.map +0 -1
  120. package/dist/output/send-error-page.d.ts +0 -5
  121. package/dist/output/send-error-page.d.ts.map +0 -1
  122. package/dist/output/send-error-page.js +0 -31
  123. package/dist/output/send-error-page.js.map +0 -1
  124. package/src/output/send-error-page.ts +0 -41
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-provider.d.ts","sourceRoot":"","sources":["../src/oauth-provider.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAmB,MAAM,cAAc,CAAA;AACvE,OAAO,EACL,WAAW,EAEX,oCAAoC,EACpC,gCAAgC,EAChC,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EAGf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAIlD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAqB,MAAM,yBAAyB,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAkB,MAAM,uBAAuB,CAAA;AAChE,OAAO,EACL,aAAa,EACb,sBAAsB,EACvB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,WAAW,EAAiB,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;cAWzD,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;cAW3C,iBAAiB,CACxC,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,aAAa,CAAC,EAAE,wBAAwB;IAgB1C;;;OAGG;IACI,WAAW,CAChB,CAAC,GAAG,IAAI,EACR,GAAG,SAAS,eAAe,GAAG,eAAe,EAC7C,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,OAAO,CAAC,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;IAKnD,WAAW,CAChB,CAAC,GAAG,IAAI,EACR,GAAG,SAAS,eAAe,GAAG,eAAe,EAC7C,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,EACA,OAGa,GACd,GAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAM;CA+bhC"}
@@ -34,9 +34,8 @@ const date_js_1 = require("./lib/util/date.js");
34
34
  const build_metadata_js_1 = require("./metadata/build-metadata.js");
35
35
  const oauth_verifier_js_1 = require("./oauth-verifier.js");
36
36
  const build_error_payload_js_1 = require("./output/build-error-payload.js");
37
- const send_authorize_page_js_1 = require("./output/send-authorize-page.js");
37
+ const output_manager_js_1 = require("./output/output-manager.js");
38
38
  const send_authorize_redirect_js_1 = require("./output/send-authorize-redirect.js");
39
- const send_error_page_js_1 = require("./output/send-error-page.js");
40
39
  const oidc_payload_js_1 = require("./parameters/oidc-payload.js");
41
40
  const replay_store_js_1 = require("./replay/replay-store.js");
42
41
  const request_manager_js_1 = require("./request/request-manager.js");
@@ -263,16 +262,24 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
263
262
  }
264
263
  async getSessions(client, clientAuth, deviceId, parameters) {
265
264
  const accounts = await this.accountManager.list(deviceId);
265
+ const hint = parameters.login_hint;
266
+ const matchesHint = (account) => (!!account.sub && account.sub === hint) ||
267
+ (!!account.preferred_username && account.preferred_username === hint);
266
268
  return accounts.map(({ account, info }) => ({
267
269
  account,
268
270
  info,
269
271
  selected: parameters.prompt !== 'select_account' &&
270
- parameters.login_hint === account.sub,
272
+ matchesHint(account) &&
273
+ // If an account uses the sub of another account as preferred_username,
274
+ // there might be multiple accounts matching the hint. In that case,
275
+ // selecting the account automatically may have unexpected results (i.e.
276
+ // not able to login using desired account).
277
+ accounts.reduce((acc, a) => acc + (matchesHint(a.account) ? 1 : 0), 0) === 1,
271
278
  loginRequired: parameters.prompt === 'login' ||
272
279
  this.loginRequired(client, parameters, info),
273
280
  consentRequired: parameters.prompt === 'consent' ||
274
281
  !info.authorizedClients.includes(client.id),
275
- matchesHint: parameters.login_hint === account.sub || parameters.login_hint == null,
282
+ matchesHint: hint == null || matchesHint(account),
276
283
  }));
277
284
  }
278
285
  async signIn(deviceId, credentials) {
@@ -448,6 +455,7 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
448
455
  ? (req, res, err, msg) => console.error(`OAuthProvider error (${msg}):`, err)
449
456
  : undefined, } = {}) {
450
457
  const deviceManager = new device_manager_js_1.DeviceManager(this.deviceStore);
458
+ const outputManager = new output_manager_js_1.OutputManager(this.customization);
451
459
  // eslint-disable-next-line @typescript-eslint/no-this-alias
452
460
  const server = this;
453
461
  const issuerUrl = new URL(server.issuer);
@@ -470,7 +478,7 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
470
478
  * Wrap an OAuth endpoint in a middleware that will set the appropriate
471
479
  * response headers and format the response as JSON.
472
480
  */
473
- const dynamicJson = (buildJson, status) => async function (req, res) {
481
+ const jsonHandler = (buildJson, status) => async function (req, res) {
474
482
  res.setHeader('Access-Control-Allow-Origin', '*');
475
483
  // https://www.rfc-editor.org/rfc/rfc6749.html#section-5.1
476
484
  res.setHeader('Cache-Control', 'no-store');
@@ -508,6 +516,25 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
508
516
  }
509
517
  }
510
518
  };
519
+ const navigationHandler = (handler) => async function (req, res) {
520
+ res.setHeader('Cache-Control', 'no-store');
521
+ res.setHeader('Pragma', 'no-cache');
522
+ try {
523
+ (0, index_js_1.validateFetchMode)(req, res, ['navigate']);
524
+ (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
525
+ await handler.call(this, req, res);
526
+ // Should never happen (fool proofing)
527
+ if (!res.headersSent) {
528
+ throw new Error('Navigation handler did not send a response');
529
+ }
530
+ }
531
+ catch (err) {
532
+ await onError?.(req, res, err, `Failed to handle navigation request to "${req.url}"`);
533
+ if (!res.headersSent) {
534
+ await outputManager.sendErrorPage(res, err);
535
+ }
536
+ }
537
+ };
511
538
  //- Public OAuth endpoints
512
539
  /*
513
540
  * Although OpenID compatibility is not required to implement the Atproto
@@ -535,7 +562,7 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
535
562
  .end();
536
563
  });
537
564
  router.get('/oauth/jwks', staticJson(server.jwks));
538
- router.post('/oauth/par', dynamicJson(async function (req, _res) {
565
+ router.post('/oauth/par', jsonHandler(async function (req, _res) {
539
566
  const input = await (0, index_js_1.validateRequestPayload)(req, types_js_1.pushedAuthorizationRequestSchema);
540
567
  const dpopJkt = await server.checkDpopProof(req.headers['dpop'], req.method, this.url);
541
568
  return server.pushedAuthorizationRequest(input, dpopJkt);
@@ -544,12 +571,12 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
544
571
  router.addRoute('*', '/oauth/par', (req, res) => {
545
572
  res.writeHead(405).end();
546
573
  });
547
- router.post('/oauth/token', dynamicJson(async function (req, _res) {
574
+ router.post('/oauth/token', jsonHandler(async function (req, _res) {
548
575
  const input = await (0, index_js_1.validateRequestPayload)(req, types_js_2.tokenRequestSchema);
549
576
  const dpopJkt = await server.checkDpopProof(req.headers['dpop'], req.method, this.url);
550
577
  return server.token(input, dpopJkt);
551
578
  }));
552
- router.post('/oauth/revoke', dynamicJson(async function (req, res) {
579
+ router.post('/oauth/revoke', jsonHandler(async function (req, res) {
553
580
  const input = await (0, index_js_1.validateRequestPayload)(req, types_js_2.revokeSchema);
554
581
  try {
555
582
  await server.revoke(input);
@@ -558,9 +585,7 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
558
585
  onError?.(req, res, err, 'Failed to revoke token');
559
586
  }
560
587
  }));
561
- router.get('/oauth/revoke', dynamicJson(async function (req, res) {
562
- (0, index_js_1.validateFetchMode)(req, res, ['navigate']);
563
- (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
588
+ router.get('/oauth/revoke', navigationHandler(async function (req, res) {
564
589
  const query = Object.fromEntries(this.url.searchParams);
565
590
  const input = types_js_2.revokeSchema.parse(query, { path: ['query'] });
566
591
  try {
@@ -573,7 +598,7 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
573
598
  // todo: generate JSONP response (if "callback" is provided)
574
599
  throw new Error('You are successfully logged out. Redirect not implemented');
575
600
  }));
576
- router.post('/oauth/introspect', dynamicJson(async function (req, _res) {
601
+ router.post('/oauth/introspect', jsonHandler(async function (req, _res) {
577
602
  const input = await (0, index_js_1.validateRequestPayload)(req, types_js_2.introspectSchema);
578
603
  return server.introspect(input);
579
604
  }));
@@ -601,10 +626,10 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
601
626
  return server.userinfo(tokenInfo);
602
627
  }, {
603
628
  '': 'application/json',
604
- 'application/json': dynamicJson(async function (_req, _res) {
629
+ 'application/json': jsonHandler(async function (_req, _res) {
605
630
  return this.data;
606
631
  }),
607
- 'application/jwt': dynamicJson(async function (_req, res) {
632
+ 'application/jwt': jsonHandler(async function (_req, res) {
608
633
  const jwt = await server.signUserinfo(this.data);
609
634
  res.writeHead(200, { 'Content-Type': 'application/jwt' }).end(jwt);
610
635
  return undefined;
@@ -612,49 +637,34 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
612
637
  }));
613
638
  //- Private authorization endpoints
614
639
  router.use((0, assets_middleware_js_1.authorizeAssetsMiddleware)());
615
- router.get('/oauth/authorize', async function (req, res) {
616
- try {
617
- res.setHeader('Cache-Control', 'no-store');
618
- (0, index_js_1.validateFetchMode)(req, res, ['navigate']);
619
- (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
620
- const query = Object.fromEntries(this.url.searchParams);
621
- const input = await types_js_1.authorizationRequestQuerySchema.parseAsync(query, {
622
- path: ['query'],
623
- });
624
- const { deviceId } = await deviceManager.load(req, res);
625
- const data = await server.authorize(deviceId, input);
626
- switch (true) {
627
- case 'redirect' in data: {
628
- return await (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
629
- }
630
- case 'authorize' in data: {
631
- await (0, index_js_1.setupCsrfToken)(req, res, csrfCookie(data.authorize.uri));
632
- return await (0, send_authorize_page_js_1.sendAuthorizePage)(res, data, server.customization);
633
- }
634
- default: {
635
- // Should never happen
636
- throw new Error('Unexpected authorization result');
637
- }
640
+ router.get('/oauth/authorize', navigationHandler(async function (req, res) {
641
+ const query = Object.fromEntries(this.url.searchParams);
642
+ const input = await types_js_1.authorizationRequestQuerySchema.parseAsync(query, {
643
+ path: ['query'],
644
+ });
645
+ const { deviceId } = await deviceManager.load(req, res);
646
+ const data = await server.authorize(deviceId, input);
647
+ switch (true) {
648
+ case 'redirect' in data: {
649
+ return (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
638
650
  }
639
- }
640
- catch (err) {
641
- await onError?.(req, res, err, 'Failed to setup authorize');
642
- if (!res.headersSent) {
643
- await (0, send_error_page_js_1.sendErrorPage)(res, err, server.customization);
651
+ case 'authorize' in data: {
652
+ await (0, index_js_1.setupCsrfToken)(req, res, csrfCookie(data.authorize.uri));
653
+ return outputManager.sendAuthorizePage(res, data);
654
+ }
655
+ default: {
656
+ // Should never happen
657
+ throw new Error('Unexpected authorization result');
644
658
  }
645
659
  }
646
- });
660
+ }));
647
661
  const signInPayloadSchema = zod_1.z.object({
648
662
  csrf_token: zod_1.z.string(),
649
663
  request_uri: request_uri_js_1.requestUriSchema,
650
664
  client_id: client_id_js_1.clientIdSchema,
651
- credentials: zod_1.z.object({
652
- username: zod_1.z.string(),
653
- password: zod_1.z.string(),
654
- remember: zod_1.z.boolean().optional().default(false),
655
- }),
665
+ credentials: account_store_js_1.signInCredentialsSchema,
656
666
  });
657
- router.post('/oauth/authorize/sign-in', async function (req, res) {
667
+ router.post('/oauth/authorize/sign-in', jsonHandler(async function (req, res) {
658
668
  (0, index_js_1.validateFetchMode)(req, res, ['same-origin']);
659
669
  (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
660
670
  const input = await (0, index_js_1.validateRequestPayload)(req, signInPayloadSchema);
@@ -667,80 +677,58 @@ class OAuthProvider extends oauth_verifier_js_1.OAuthVerifier {
667
677
  const { account, info } = await server.signIn(deviceId, input.credentials);
668
678
  // Prevent fixation attacks
669
679
  await deviceManager.rotate(req, res, deviceId);
670
- return (0, index_js_1.writeJson)(res, {
680
+ return {
671
681
  account,
672
682
  consentRequired: !info.authorizedClients.includes(input.client_id),
673
- });
674
- });
683
+ };
684
+ }));
675
685
  const acceptQuerySchema = zod_1.z.object({
676
686
  csrf_token: zod_1.z.string(),
677
687
  request_uri: request_uri_js_1.requestUriSchema,
678
688
  client_id: client_id_js_1.clientIdSchema,
679
689
  account_sub: zod_1.z.string(),
680
690
  });
681
- router.get('/oauth/authorize/accept', async function (req, res) {
682
- try {
683
- res.setHeader('Cache-Control', 'no-store');
684
- (0, index_js_1.validateFetchMode)(req, res, ['navigate']);
685
- (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
686
- const query = Object.fromEntries(this.url.searchParams);
687
- const input = await acceptQuerySchema.parseAsync(query, {
688
- path: ['query'],
689
- });
690
- (0, index_js_1.validateReferer)(req, res, {
691
- origin: issuerOrigin,
692
- pathname: '/oauth/authorize',
693
- searchParams: [
694
- ['request_uri', input.request_uri],
695
- ['client_id', input.client_id],
696
- ],
697
- });
698
- (0, index_js_1.validateCsrfToken)(req, res, input.csrf_token, csrfCookie(input.request_uri), true);
699
- const { deviceId } = await deviceManager.load(req, res);
700
- const data = await server.acceptRequest(deviceId, input.request_uri, input.client_id, input.account_sub);
701
- return await (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
702
- }
703
- catch (err) {
704
- await onError?.(req, res, err, 'Failed to accept authorization request');
705
- if (!res.headersSent) {
706
- await (0, send_error_page_js_1.sendErrorPage)(res, err, server.customization);
707
- }
708
- }
709
- });
691
+ router.get('/oauth/authorize/accept', navigationHandler(async function (req, res) {
692
+ const query = Object.fromEntries(this.url.searchParams);
693
+ const input = await acceptQuerySchema.parseAsync(query, {
694
+ path: ['query'],
695
+ });
696
+ (0, index_js_1.validateReferer)(req, res, {
697
+ origin: issuerOrigin,
698
+ pathname: '/oauth/authorize',
699
+ searchParams: [
700
+ ['request_uri', input.request_uri],
701
+ ['client_id', input.client_id],
702
+ ],
703
+ });
704
+ (0, index_js_1.validateCsrfToken)(req, res, input.csrf_token, csrfCookie(input.request_uri), true);
705
+ const { deviceId } = await deviceManager.load(req, res);
706
+ const data = await server.acceptRequest(deviceId, input.request_uri, input.client_id, input.account_sub);
707
+ return await (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
708
+ }));
710
709
  const rejectQuerySchema = zod_1.z.object({
711
710
  csrf_token: zod_1.z.string(),
712
711
  request_uri: request_uri_js_1.requestUriSchema,
713
712
  client_id: client_id_js_1.clientIdSchema,
714
713
  });
715
- router.get('/oauth/authorize/reject', async function (req, res) {
716
- try {
717
- res.setHeader('Cache-Control', 'no-store');
718
- (0, index_js_1.validateFetchMode)(req, res, ['navigate']);
719
- (0, index_js_1.validateSameOrigin)(req, res, issuerOrigin);
720
- const query = Object.fromEntries(this.url.searchParams);
721
- const input = await rejectQuerySchema.parseAsync(query, {
722
- path: ['query'],
723
- });
724
- (0, index_js_1.validateReferer)(req, res, {
725
- origin: issuerOrigin,
726
- pathname: '/oauth/authorize',
727
- searchParams: [
728
- ['request_uri', input.request_uri],
729
- ['client_id', input.client_id],
730
- ],
731
- });
732
- (0, index_js_1.validateCsrfToken)(req, res, input.csrf_token, csrfCookie(input.request_uri), true);
733
- const { deviceId } = await deviceManager.load(req, res);
734
- const data = await server.rejectRequest(deviceId, input.request_uri, input.client_id);
735
- return await (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
736
- }
737
- catch (err) {
738
- await onError?.(req, res, err, 'Failed to reject authorization request');
739
- if (!res.headersSent) {
740
- await (0, send_error_page_js_1.sendErrorPage)(res, err, server.customization);
741
- }
742
- }
743
- });
714
+ router.get('/oauth/authorize/reject', navigationHandler(async function (req, res) {
715
+ const query = Object.fromEntries(this.url.searchParams);
716
+ const input = await rejectQuerySchema.parseAsync(query, {
717
+ path: ['query'],
718
+ });
719
+ (0, index_js_1.validateReferer)(req, res, {
720
+ origin: issuerOrigin,
721
+ pathname: '/oauth/authorize',
722
+ searchParams: [
723
+ ['request_uri', input.request_uri],
724
+ ['client_id', input.client_id],
725
+ ],
726
+ });
727
+ (0, index_js_1.validateCsrfToken)(req, res, input.csrf_token, csrfCookie(input.request_uri), true);
728
+ const { deviceId } = await deviceManager.load(req, res);
729
+ const data = await server.rejectRequest(deviceId, input.request_uri, input.client_id);
730
+ return await (0, send_authorize_redirect_js_1.sendAuthorizeRedirect)(res, data);
731
+ }));
744
732
  return router;
745
733
  }
746
734
  }
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-provider.js","sourceRoot":"","sources":["../src/oauth-provider.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAExD,2EAAqE;AACrE,sCAAuE;AAiIrE,uFAjIa,YAAM,OAiIb;AAhIR,sDAY6B;AAE7B,6BAAuB;AAEvB,8EAAqE;AACrE,qEAA6D;AAC7D,iEAMmC;AAEnC,wEAAyE;AACzE,4DAAuE;AACvE,wDAAgE;AAChE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G,MAAM,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE;gBACtD,IAAI,EAAE,CAAC,OAAO,CAAC;aAChB,CAAC,CAAA;YAEF,IAAA,0BAAe,EAAC,GAAG,EAAE,GAAG,EAAE;gBACxB,MAAM,EAAE,YAAY;gBACpB,QAAQ,EAAE,kBAAkB;gBAC5B,YAAY,EAAE;oBACZ,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC;oBAClC,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;iBAC/B;aACF,CAAC,CAAA;YACF,IAAA,4BAAiB,EACf,GAAG,EACH,GAAG,EACH,KAAK,CAAC,UAAU,EAChB,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,EAC7B,IAAI,CACL,CAAA;YAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAEvD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,aAAa,CACrC,QAAQ,EACR,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,SAAS,CAChB,CAAA;YAED,OAAO,MAAM,IAAA,kDAAqB,EAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAC/C,CAAC,CAAC,CACH,CAAA;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAtqCD,sCAsqCC"}
@@ -1,11 +1,8 @@
1
- /// <reference types="node" />
2
1
  import { OAuthAuthenticationRequestParameters, OAuthClientMetadata } from '@atproto/oauth-types';
3
- import { ServerResponse } from 'node:http';
4
2
  import { DeviceAccountInfo } from '../account/account-store.js';
5
3
  import { Account } from '../account/account.js';
6
4
  import { Client } from '../client/client.js';
7
5
  import { RequestUri } from '../request/request-uri.js';
8
- import { Customization } from './customization.js';
9
6
  export type AuthorizationResultAuthorize = {
10
7
  issuer: string;
11
8
  client: Client;
@@ -38,6 +35,6 @@ export type AuthorizeData = {
38
35
  newSessionsRequireConsent: boolean;
39
36
  sessions: Session[];
40
37
  };
41
- export declare function sendAuthorizePage(res: ServerResponse, data: AuthorizationResultAuthorize, customization?: Customization): Promise<void>;
38
+ export declare function buildAuthorizeData(data: AuthorizationResultAuthorize): AuthorizeData;
42
39
  export {};
43
- //# sourceMappingURL=send-authorize-page.d.ts.map
40
+ //# sourceMappingURL=build-authorize-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-authorize-data.d.ts","sourceRoot":"","sources":["../../src/output/build-authorize-data.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,oCAAoC,CAAA;IAChD,SAAS,EAAE;QACT,GAAG,EAAE,UAAU,CAAA;QACf,QAAQ,EAAE,SAAS;YACjB,OAAO,EAAE,OAAO,CAAA;YAChB,IAAI,EAAE,iBAAiB,CAAA;YAEvB,QAAQ,EAAE,OAAO,CAAA;YACjB,aAAa,EAAE,OAAO,CAAA;YACtB,eAAe,EAAE,OAAO,CAAA;SACzB,EAAE,CAAA;KACJ,CAAA;CACF,CAAA;AAKD,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,CAAA;IAEZ,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,mBAAmB,CAAA;IACnC,aAAa,EAAE,OAAO,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yBAAyB,EAAE,OAAO,CAAA;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB,CAAA;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,4BAA4B,GACjC,aAAa,CAkBf"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildAuthorizeData = void 0;
4
+ function buildAuthorizeData(data) {
5
+ return {
6
+ clientId: data.client.id,
7
+ clientMetadata: data.client.metadata,
8
+ clientTrusted: data.client.info.isTrusted,
9
+ requestUri: data.authorize.uri,
10
+ csrfCookie: `csrf-${data.authorize.uri}`,
11
+ loginHint: data.parameters.login_hint,
12
+ newSessionsRequireConsent: data.parameters.prompt === 'consent',
13
+ sessions: data.authorize.sessions.map((session) => ({
14
+ account: session.account,
15
+ selected: session.selected,
16
+ loginRequired: session.loginRequired,
17
+ consentRequired: session.consentRequired,
18
+ })),
19
+ };
20
+ }
21
+ exports.buildAuthorizeData = buildAuthorizeData;
22
+ //# sourceMappingURL=build-authorize-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-authorize-data.js","sourceRoot":"","sources":["../../src/output/build-authorize-data.ts"],"names":[],"mappings":";;;AAkDA,SAAgB,kBAAkB,CAChC,IAAkC;IAElC,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;QACxB,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;QACpC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;QACzC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;QAC9B,UAAU,EAAE,QAAQ,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE;QACxC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU;QACrC,yBAAyB,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,SAAS;QAC/D,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CACnC,CAAC,OAAO,EAAW,EAAE,CAAC,CAAC;YACrB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,eAAe,EAAE,OAAO,CAAC,eAAe;SACzC,CAAC,CACH;KACF,CAAA;AACH,CAAC;AApBD,gDAoBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-error-payload.d.ts","sourceRoot":"","sources":["../../src/output/build-error-payload.ts"],"names":[],"mappings":"AASA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAwCvD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAqDA"}
1
+ {"version":3,"file":"build-error-payload.d.ts","sourceRoot":"","sources":["../../src/output/build-error-payload.ts"],"names":[],"mappings":"AAWA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAwCvD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAqDA"}
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildErrorPayload = exports.buildErrorStatus = void 0;
4
4
  const jwk_1 = require("@atproto/jwk");
5
- const errors_1 = require("jose/errors");
5
+ const jose_1 = require("jose");
6
6
  const zod_1 = require("zod");
7
7
  const oauth_error_js_1 = require("../errors/oauth-error.js");
8
+ const { JOSEError } = jose_1.errors;
8
9
  const INVALID_REQUEST = 'invalid_request';
9
10
  const SERVER_ERROR = 'server_error';
10
11
  function buildErrorStatus(error) {
@@ -17,7 +18,7 @@ function buildErrorStatus(error) {
17
18
  if (error instanceof zod_1.ZodError) {
18
19
  return 400;
19
20
  }
20
- if (error instanceof errors_1.JOSEError) {
21
+ if (error instanceof JOSEError) {
21
22
  return 400;
22
23
  }
23
24
  if (error instanceof TypeError) {
@@ -49,7 +50,7 @@ function buildErrorPayload(error) {
49
50
  error_description: error.issues[0]?.message || 'Invalid request',
50
51
  };
51
52
  }
52
- if (error instanceof errors_1.JOSEError) {
53
+ if (error instanceof JOSEError) {
53
54
  return {
54
55
  error: INVALID_REQUEST,
55
56
  error_description: error.message,
@@ -1 +1 @@
1
- {"version":3,"file":"build-error-payload.js","sourceRoot":"","sources":["../../src/output/build-error-payload.ts"],"names":[],"mappings":";;;AAAA,sCAA6C;AAC7C,wCAAuC;AACvC,6BAA8B;AAE9B,6DAAqD;AAErD,MAAM,eAAe,GAAG,iBAAiB,CAAA;AACzC,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,IAAI,KAAK,YAAY,2BAAU,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,UAAU,CAAA;IACzB,CAAC;IAED,IAAI,KAAK,YAAY,oBAAc,EAAE,CAAC;QACpC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,KAAK,YAAY,cAAQ,EAAE,CAAC;QAC9B,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,KAAK,YAAY,kBAAS,EAAE,CAAC;QAC/B,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,KAAK,YAAY,SAAS,EAAE,CAAC;QAC/B,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU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I;QACT,OAAO,CAAC,KAAK,QAAQ;QACrB,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ;QAC9B,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK,QAAQ,CACjC,CAAA;AACH,CAAC"}
@@ -1,16 +1,5 @@
1
- declare const colorNames: readonly ["primary", "error"];
1
+ declare const colorNames: readonly ["brand", "error", "warning"];
2
2
  type ColorName = (typeof colorNames)[number];
3
- export type FieldDefinition = {
4
- label?: string;
5
- placeholder?: string;
6
- pattern?: string;
7
- title?: string;
8
- };
9
- export type ExtraFieldDefinition = FieldDefinition & {
10
- type: 'text' | 'password' | 'date' | 'captcha';
11
- required?: boolean;
12
- [_: string]: unknown;
13
- };
14
3
  export type Customization = {
15
4
  name?: string;
16
5
  logo?: string;
@@ -33,5 +22,6 @@ export declare function buildCustomizationData({ name, logo, links, }?: Customiz
33
22
  }[] | undefined;
34
23
  };
35
24
  export declare function buildCustomizationCss(customization?: Customization): string;
25
+ export declare function buildCustomizationVars(customization?: Customization): Generator<string, void, unknown>;
36
26
  export {};
37
27
  //# sourceMappingURL=customization.d.ts.map