authhero 5.4.1 → 5.6.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.
@@ -56021,6 +56021,16 @@ export type UserInfo = {
56021
56021
  family_name?: string;
56022
56022
  name?: string;
56023
56023
  };
56024
+ /**
56025
+ * Verified result returned by strategies that also expose the unmodified
56026
+ * upstream payload (id_token payload, userinfo response, etc.). Used by the
56027
+ * "Try Connection" diagnostic flow to surface raw provider claims to the
56028
+ * caller — production flows only consume `userinfo`.
56029
+ */
56030
+ export type UserInfoWithRaw = {
56031
+ userinfo: UserInfo;
56032
+ raw: Record<string, unknown> | null;
56033
+ };
56024
56034
  export type StrategyHandler = {
56025
56035
  displayName: string;
56026
56036
  logoDataUri: string;
@@ -56036,6 +56046,10 @@ export type StrategyHandler = {
56036
56046
  Bindings: Bindings;
56037
56047
  Variables: Variables;
56038
56048
  }>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfo>;
56049
+ validateAuthorizationCodeAndGetUserWithRaw?: (ctx: Context<{
56050
+ Bindings: Bindings;
56051
+ Variables: Variables;
56052
+ }>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfoWithRaw>;
56039
56053
  disableEmbeddedBrowsers?: boolean;
56040
56054
  };
56041
56055
  export declare type Fetcher = {
@@ -56568,10 +56582,10 @@ export declare class WebhookDestination implements EventDestination {
56568
56582
  }
56569
56583
  export interface CreateDefaultDestinationsConfig {
56570
56584
  /**
56571
- * Data adapter — only the `logs`, `hooks`, and `users` adapters are used
56572
- * by the built-in destinations.
56585
+ * Data adapter — only the `logs`, `hooks`, `users`, and `logStreams`
56586
+ * adapters are used by the built-in destinations.
56573
56587
  */
56574
- dataAdapter: Pick<DataAdapters, "logs" | "hooks" | "users">;
56588
+ dataAdapter: Pick<DataAdapters, "logs" | "hooks" | "users" | "logStreams">;
56575
56589
  /**
56576
56590
  * Produces a Bearer access token for the given tenant, used when POSTing
56577
56591
  * `hook.*` events to the configured webhook URLs.
@@ -64430,6 +64444,53 @@ export declare function init(config: AuthHeroConfig): {
64430
64444
  status: 204;
64431
64445
  };
64432
64446
  };
64447
+ } & {
64448
+ "/:id/try": {
64449
+ $post: {
64450
+ input: {
64451
+ param: {
64452
+ id: string;
64453
+ };
64454
+ } & {
64455
+ header: {
64456
+ "tenant-id"?: string | undefined;
64457
+ };
64458
+ } & {
64459
+ json: {
64460
+ password?: string | undefined;
64461
+ username?: string | undefined;
64462
+ } | undefined;
64463
+ };
64464
+ output: {
64465
+ client_id: string;
64466
+ connection: {
64467
+ name: string;
64468
+ id: string;
64469
+ strategy: string;
64470
+ };
64471
+ state: string;
64472
+ mode: "redirect";
64473
+ authorize_url: string;
64474
+ result_url: string;
64475
+ } | {
64476
+ status: "error" | "success";
64477
+ strategy: string;
64478
+ connection_id: string;
64479
+ mode: "inline";
64480
+ connection_name: string;
64481
+ userinfo?: {
64482
+ [x: string]: import("hono/utils/types").JSONValue;
64483
+ } | undefined;
64484
+ raw?: {
64485
+ [x: string]: import("hono/utils/types").JSONValue;
64486
+ } | null | undefined;
64487
+ error?: string | undefined;
64488
+ error_description?: string | undefined;
64489
+ };
64490
+ outputFormat: "json";
64491
+ status: 200;
64492
+ };
64493
+ };
64433
64494
  }, "/connections"> & import("hono/types").MergeSchemaPath<{
64434
64495
  "/": {
64435
64496
  $post: {
@@ -65406,6 +65467,7 @@ export declare function init(config: AuthHeroConfig): {
65406
65467
  json: {
65407
65468
  name?: string | undefined;
65408
65469
  connection?: string | undefined;
65470
+ id?: string | undefined;
65409
65471
  credentials?: {
65410
65472
  client_id: string;
65411
65473
  client_secret: string;
@@ -65413,7 +65475,6 @@ export declare function init(config: AuthHeroConfig): {
65413
65475
  audience?: string | undefined;
65414
65476
  scope?: string | undefined;
65415
65477
  } | undefined;
65416
- id?: string | undefined;
65417
65478
  provider?: "auth0" | "oidc" | "cognito" | "okta" | undefined;
65418
65479
  enabled?: boolean | undefined;
65419
65480
  };
@@ -68306,8 +68367,8 @@ export declare function init(config: AuthHeroConfig): {
68306
68367
  body?: string | undefined;
68307
68368
  from?: string | undefined;
68308
68369
  enabled?: boolean | undefined;
68309
- template?: "verify_email" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "password_reset" | "user_invitation" | undefined;
68310
68370
  subject?: string | undefined;
68371
+ template?: "verify_email" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "password_reset" | "user_invitation" | undefined;
68311
68372
  syntax?: "liquid" | undefined;
68312
68373
  resultUrl?: string | undefined;
68313
68374
  urlLifetimeInSeconds?: number | undefined;
@@ -68331,8 +68392,8 @@ export declare function init(config: AuthHeroConfig): {
68331
68392
  body?: string | undefined;
68332
68393
  from?: string | undefined;
68333
68394
  enabled?: boolean | undefined;
68334
- template?: "verify_email" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "password_reset" | "user_invitation" | undefined;
68335
68395
  subject?: string | undefined;
68396
+ template?: "verify_email" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "password_reset" | "user_invitation" | undefined;
68336
68397
  syntax?: "liquid" | undefined;
68337
68398
  resultUrl?: string | undefined;
68338
68399
  urlLifetimeInSeconds?: number | undefined;
@@ -70585,13 +70646,13 @@ export declare function init(config: AuthHeroConfig): {
70585
70646
  redirect_uri?: string | undefined;
70586
70647
  prompt?: string | undefined;
70587
70648
  state?: string | undefined;
70649
+ code_challenge?: string | undefined;
70650
+ code_challenge_method?: CodeChallengeMethod | undefined;
70651
+ screen_hint?: string | undefined;
70588
70652
  auth0Client?: string | undefined;
70589
70653
  login_ticket?: string | undefined;
70590
- screen_hint?: string | undefined;
70591
70654
  realm?: string | undefined;
70592
70655
  ui_locales?: string | undefined;
70593
- code_challenge?: string | undefined;
70594
- code_challenge_method?: CodeChallengeMethod | undefined;
70595
70656
  max_age?: string | undefined;
70596
70657
  acr_values?: string | undefined;
70597
70658
  claims?: string | Record<string, any> | undefined;
@@ -70619,13 +70680,13 @@ export declare function init(config: AuthHeroConfig): {
70619
70680
  redirect_uri?: string | undefined;
70620
70681
  prompt?: string | undefined;
70621
70682
  state?: string | undefined;
70683
+ code_challenge?: string | undefined;
70684
+ code_challenge_method?: CodeChallengeMethod | undefined;
70685
+ screen_hint?: string | undefined;
70622
70686
  auth0Client?: string | undefined;
70623
70687
  login_ticket?: string | undefined;
70624
- screen_hint?: string | undefined;
70625
70688
  realm?: string | undefined;
70626
70689
  ui_locales?: string | undefined;
70627
- code_challenge?: string | undefined;
70628
- code_challenge_method?: CodeChallengeMethod | undefined;
70629
70690
  max_age?: string | undefined;
70630
70691
  acr_values?: string | undefined;
70631
70692
  claims?: string | Record<string, any> | undefined;
@@ -70653,13 +70714,13 @@ export declare function init(config: AuthHeroConfig): {
70653
70714
  redirect_uri?: string | undefined;
70654
70715
  prompt?: string | undefined;
70655
70716
  state?: string | undefined;
70717
+ code_challenge?: string | undefined;
70718
+ code_challenge_method?: CodeChallengeMethod | undefined;
70719
+ screen_hint?: string | undefined;
70656
70720
  auth0Client?: string | undefined;
70657
70721
  login_ticket?: string | undefined;
70658
- screen_hint?: string | undefined;
70659
70722
  realm?: string | undefined;
70660
70723
  ui_locales?: string | undefined;
70661
- code_challenge?: string | undefined;
70662
- code_challenge_method?: CodeChallengeMethod | undefined;
70663
70724
  max_age?: string | undefined;
70664
70725
  acr_values?: string | undefined;
70665
70726
  claims?: string | Record<string, any> | undefined;
@@ -70695,13 +70756,13 @@ export declare function init(config: AuthHeroConfig): {
70695
70756
  redirect_uri?: string | undefined;
70696
70757
  prompt?: string | undefined;
70697
70758
  state?: string | undefined;
70759
+ code_challenge?: string | undefined;
70760
+ code_challenge_method?: CodeChallengeMethod | undefined;
70761
+ screen_hint?: string | undefined;
70698
70762
  auth0Client?: string | undefined;
70699
70763
  login_ticket?: string | undefined;
70700
- screen_hint?: string | undefined;
70701
70764
  realm?: string | undefined;
70702
70765
  ui_locales?: string | undefined;
70703
- code_challenge?: string | undefined;
70704
- code_challenge_method?: CodeChallengeMethod | undefined;
70705
70766
  max_age?: string | undefined;
70706
70767
  acr_values?: string | undefined;
70707
70768
  claims?: string | Record<string, any> | undefined;
@@ -70731,13 +70792,13 @@ export declare function init(config: AuthHeroConfig): {
70731
70792
  redirect_uri?: string | undefined;
70732
70793
  prompt?: string | undefined;
70733
70794
  state?: string | undefined;
70795
+ code_challenge?: string | undefined;
70796
+ code_challenge_method?: CodeChallengeMethod | undefined;
70797
+ screen_hint?: string | undefined;
70734
70798
  auth0Client?: string | undefined;
70735
70799
  login_ticket?: string | undefined;
70736
- screen_hint?: string | undefined;
70737
70800
  realm?: string | undefined;
70738
70801
  ui_locales?: string | undefined;
70739
- code_challenge?: string | undefined;
70740
- code_challenge_method?: CodeChallengeMethod | undefined;
70741
70802
  max_age?: string | undefined;
70742
70803
  acr_values?: string | undefined;
70743
70804
  claims?: string | Record<string, any> | undefined;
@@ -70842,9 +70903,9 @@ export declare function init(config: AuthHeroConfig): {
70842
70903
  redirect_uri?: string | undefined;
70843
70904
  prompt?: string | undefined;
70844
70905
  state?: string | undefined;
70845
- ui_locales?: string | undefined;
70846
70906
  code_challenge?: string | undefined;
70847
70907
  code_challenge_method?: CodeChallengeMethod | undefined;
70908
+ ui_locales?: string | undefined;
70848
70909
  act_as?: string | undefined;
70849
70910
  max_age?: number | undefined;
70850
70911
  acr_values?: string | undefined;
@@ -70878,9 +70939,9 @@ export declare function init(config: AuthHeroConfig): {
70878
70939
  redirect_uri?: string | undefined;
70879
70940
  prompt?: string | undefined;
70880
70941
  state?: string | undefined;
70881
- ui_locales?: string | undefined;
70882
70942
  code_challenge?: string | undefined;
70883
70943
  code_challenge_method?: CodeChallengeMethod | undefined;
70944
+ ui_locales?: string | undefined;
70884
70945
  act_as?: string | undefined;
70885
70946
  max_age?: number | undefined;
70886
70947
  acr_values?: string | undefined;
@@ -71564,10 +71625,10 @@ export declare function init(config: AuthHeroConfig): {
71564
71625
  locale?: string | undefined;
71565
71626
  profile?: string | undefined;
71566
71627
  address?: {
71628
+ region?: string | undefined;
71567
71629
  formatted?: string | undefined;
71568
71630
  street_address?: string | undefined;
71569
71631
  locality?: string | undefined;
71570
- region?: string | undefined;
71571
71632
  postal_code?: string | undefined;
71572
71633
  country?: string | undefined;
71573
71634
  } | undefined;
@@ -71605,10 +71666,10 @@ export declare function init(config: AuthHeroConfig): {
71605
71666
  locale?: string | undefined;
71606
71667
  profile?: string | undefined;
71607
71668
  address?: {
71669
+ region?: string | undefined;
71608
71670
  formatted?: string | undefined;
71609
71671
  street_address?: string | undefined;
71610
71672
  locality?: string | undefined;
71611
- region?: string | undefined;
71612
71673
  postal_code?: string | undefined;
71613
71674
  country?: string | undefined;
71614
71675
  } | undefined;