nuxt-auth-utils 0.5.18 → 0.5.19

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "auth-utils",
3
3
  "configKey": "auth",
4
- "version": "0.5.18",
4
+ "version": "0.5.19",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -1,5 +1,6 @@
1
1
  declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
2
- id: any;
2
+ [key: string]: unknown;
3
+ id?: string;
3
4
  user?: import("../../types").User;
4
5
  }>>;
5
6
  export default _default;
@@ -40,7 +40,7 @@ export interface OAuthFacebookConfig {
40
40
  */
41
41
  authorizationParams?: Record<string, string>;
42
42
  /**
43
- * Redirect URL to to allow overriding for situations like prod failing to determine public hostname
43
+ * Redirect URL to allow overriding for situations like prod failing to determine public hostname
44
44
  * @default process.env.NUXT_OAUTH_FACEBOOK_REDIRECT_URL or current URL
45
45
  */
46
46
  redirectURL?: string;
@@ -35,7 +35,9 @@ export function defineOAuthFacebookEventHandler({
35
35
  withQuery(config.authorizationURL, {
36
36
  client_id: config.clientId,
37
37
  redirect_uri: redirectURL,
38
- scope: config.scope.join(" ")
38
+ scope: config.scope.join(" "),
39
+ state: query.state || "",
40
+ ...config.authorizationParams
39
41
  })
40
42
  );
41
43
  }
@@ -25,6 +25,7 @@ export function defineOAuthMicrosoftEventHandler({ config, onSuccess, onError })
25
25
  response_type: "code",
26
26
  redirect_uri: redirectURL,
27
27
  scope: config.scope.join(" "),
28
+ state: query.state || "",
28
29
  ...config.authorizationParams
29
30
  })
30
31
  );
@@ -20,11 +20,7 @@ export declare const sessionHooks: import("hookable").Hookable<SessionHooks, imp
20
20
  * @param event The Request (h3) event
21
21
  * @returns The user session
22
22
  */
23
- export declare function getUserSession(event: UseSessionEvent): Promise<{
24
- id: any;
25
- user?: import("#auth-utils").User;
26
- secure?: import("#auth-utils").SecureSessionData;
27
- }>;
23
+ export declare function getUserSession(event: UseSessionEvent): Promise<UserSession>;
28
24
  /**
29
25
  * Set a user session
30
26
  * @param event The Request (h3) event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-auth-utils",
3
- "version": "0.5.18",
3
+ "version": "0.5.19",
4
4
  "description": "Add Authentication to Nuxt applications with secured & sealed cookies sessions.",
5
5
  "repository": {
6
6
  "type": "git",