@better-auth-ui/react 1.6.28 → 1.6.29
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/hooks/auth/use-last-login-method.d.ts +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +262 -249
- package/dist/lib/auth-client.d.ts +4 -1
- package/package.json +1 -1
- package/src/hooks/auth/use-last-login-method.ts +51 -0
- package/src/index.ts +1 -0
- package/src/lib/auth-client.ts +7 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LastLoginMethodLocalization } from '@better-auth-ui/core/plugins';
|
|
2
|
+
export type LastLoginMethodState = {
|
|
3
|
+
/** Most recently used method, such as `"email"`, `"google"`, or `"github"`. */
|
|
4
|
+
method: string | null;
|
|
5
|
+
/** Localization contributed by `lastLoginMethodPlugin()`. */
|
|
6
|
+
localization: LastLoginMethodLocalization;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Reads Better Auth's last-login-method cookie after hydration.
|
|
10
|
+
*
|
|
11
|
+
* Always returns an object containing `method` and `localization`. Only
|
|
12
|
+
* `method` is `null` when the UI plugin is not registered or the matching
|
|
13
|
+
* Better Auth client plugin has no stored method.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useLastLoginMethod(): LastLoginMethodState;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './components/auth/fetch-options-provider';
|
|
|
3
3
|
export * from './components/icons';
|
|
4
4
|
export * from './components/settings/account/theme-preview';
|
|
5
5
|
export * from './hooks/auth/use-authenticate';
|
|
6
|
+
export * from './hooks/auth/use-last-login-method';
|
|
6
7
|
export * from './hooks/auth/use-user';
|
|
7
8
|
export * from './hooks/use-auth-mutation';
|
|
8
9
|
export * from './hooks/use-auth-plugin';
|