@absolutejs/auth 0.57.0 → 0.57.2

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.
package/dist/index.d.ts CHANGED
@@ -1767,6 +1767,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
1767
1767
  [x: string]: {
1768
1768
  post: {
1769
1769
  body: {
1770
+ code?: string | undefined;
1770
1771
  client_id?: string | undefined;
1771
1772
  scope?: string | undefined;
1772
1773
  audience?: string | undefined;
@@ -1778,7 +1779,6 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
1778
1779
  claim_token?: string | undefined;
1779
1780
  assertion?: string | undefined;
1780
1781
  client_secret?: string | undefined;
1781
- code?: string | undefined;
1782
1782
  redirect_uri?: string | undefined;
1783
1783
  client_assertion?: string | undefined;
1784
1784
  client_assertion_type?: string | undefined;
@@ -64,6 +64,7 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
64
64
  [x: string]: {
65
65
  post: {
66
66
  body: {
67
+ code?: string | undefined;
67
68
  client_id?: string | undefined;
68
69
  scope?: string | undefined;
69
70
  audience?: string | undefined;
@@ -75,7 +76,6 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
75
76
  claim_token?: string | undefined;
76
77
  assertion?: string | undefined;
77
78
  client_secret?: string | undefined;
78
- code?: string | undefined;
79
79
  redirect_uri?: string | undefined;
80
80
  client_assertion?: string | undefined;
81
81
  client_assertion_type?: string | undefined;
package/dist/types.d.ts CHANGED
@@ -123,9 +123,9 @@ export type ResolvedOAuthAuthorization = {
123
123
  expiresAt?: number;
124
124
  tokenType?: string;
125
125
  };
126
- export type StatusReturn = ElysiaCustomStatusResponse<number | keyof StatusMap, unknown>;
126
+ export type StatusReturn = Pick<ElysiaCustomStatusResponse<number | keyof StatusMap, unknown>, 'code' | 'response'>;
127
127
  export type OnNewUser<UserType> = (userIdentity: Record<string, unknown>) => UserType | StatusReturn | Response | Promise<UserType | StatusReturn | Response>;
128
- export type GetUser<UserType> = (userIdentity: Record<string, unknown>) => UserType | null | undefined | Promise<UserType | null | undefined>;
128
+ export type GetUser<UserType> = (userIdentity: Record<string, unknown>) => UserType | StatusReturn | Response | null | undefined | Promise<UserType | StatusReturn | Response | null | undefined>;
129
129
  export type CallbackCookie = Record<string, Cookie<unknown>> & {
130
130
  auth_client: Cookie<string | undefined>;
131
131
  auth_intent: Cookie<AuthIntent | undefined>;
@@ -413,8 +413,8 @@ export type InsantiateUserSessionProps<UserType> = {
413
413
  unregisteredSession: UnregisteredSessionRecord;
414
414
  providerInstance: OAuth2Client<ProviderOption>;
415
415
  user_session_id: Cookie<UserSessionId | undefined>;
416
- onNewUser: OnNewUser<UserType>;
417
- getUser: GetUser<UserType>;
416
+ onNewUser: OnNewUser<NoInfer<UserType>>;
417
+ getUser: GetUser<NoInfer<UserType>>;
418
418
  cookieSecure?: boolean;
419
419
  resolvedAuthorization?: ResolvedOAuthAuthorization;
420
420
  sessionDurationMs?: number;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.57.0",
2
+ "version": "0.57.2",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {