@meistrari/auth-nuxt 4.1.0 → 4.2.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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/auth-nuxt",
3
3
  "configKey": "telaAuth",
4
- "version": "4.1.0",
4
+ "version": "4.2.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,4 +1,4 @@
1
- import type { Session, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, User } from '@meistrari/auth-core';
1
+ import type { LoginMethod, Session, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, User } from '@meistrari/auth-core';
2
2
  import type { Ref } from 'vue';
3
3
  export interface UseTelaSessionReturn {
4
4
  /** Reactive reference to the current user. Null if not authenticated. */
@@ -23,6 +23,10 @@ export interface UseTelaSessionReturn {
23
23
  * @param options - Email/password sign-in configuration
24
24
  */
25
25
  signInWithEmailAndPassword: (options: SignInWithEmailAndPasswordOptions) => Promise<void>;
26
+ /**
27
+ * Lists the login methods enabled in the environment. Public; usable before authentication.
28
+ */
29
+ getLoginMethods: () => Promise<LoginMethod[]>;
26
30
  /**
27
31
  * Initiates social authentication flow with Google or Microsoft.
28
32
  * @param options - Social sign-in configuration
@@ -56,6 +56,9 @@ export function useTelaSession() {
56
56
  callbackURL
57
57
  });
58
58
  }
59
+ async function getLoginMethods() {
60
+ return await authClient.session.getLoginMethods();
61
+ }
59
62
  async function requestPasswordReset(email, callbackURL) {
60
63
  await authClient.session.requestPasswordReset(email, callbackURL);
61
64
  }
@@ -79,6 +82,7 @@ export function useTelaSession() {
79
82
  getSession,
80
83
  getToken,
81
84
  signInWithEmailAndPassword,
85
+ getLoginMethods,
82
86
  signInWithSocialProvider,
83
87
  signInWithSaml,
84
88
  signOut,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-nuxt",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -36,7 +36,7 @@
36
36
  "docs": "nuxt-module-build prepare && typedoc"
37
37
  },
38
38
  "dependencies": {
39
- "@meistrari/auth-core": "1.42.0",
39
+ "@meistrari/auth-core": "1.43.0",
40
40
  "jose": "6.1.3"
41
41
  },
42
42
  "peerDependencies": {