mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-01 03:46:39 -05:00
Merge branch 'main' into v1.3
This commit is contained in:
@@ -1380,6 +1380,7 @@ export const admin = <O extends AdminOptions>(options?: O) => {
|
||||
},
|
||||
$ERROR_CODES: ADMIN_ERROR_CODES,
|
||||
schema: mergeSchema(schema, opts.schema),
|
||||
options: options as any,
|
||||
} satisfies BetterAuthPlugin;
|
||||
};
|
||||
|
||||
|
||||
@@ -752,5 +752,6 @@ export const organization = <O extends OrganizationOptions>(options?: O) => {
|
||||
>,
|
||||
},
|
||||
$ERROR_CODES: ORGANIZATION_ERROR_CODES,
|
||||
options: options as any,
|
||||
} satisfies BetterAuthPlugin;
|
||||
};
|
||||
|
||||
@@ -376,7 +376,7 @@ export const otp2fa = (options?: OTPOptions) => {
|
||||
await ctx.context.internalAdapter.updateVerificationValue(
|
||||
toCheckOtp.id,
|
||||
{
|
||||
value: `${otp}!${parseInt(counter) + 1}`,
|
||||
value: `${otp}:${(parseInt(counter, 10) || 0) + 1}`,
|
||||
},
|
||||
);
|
||||
return invalid("INVALID_CODE");
|
||||
|
||||
@@ -154,7 +154,7 @@ export const totp2fa = (options?: TOTPOptions) => {
|
||||
},
|
||||
],
|
||||
});
|
||||
if (!twoFactor || !user.twoFactorEnabled) {
|
||||
if (!twoFactor) {
|
||||
throw new APIError("BAD_REQUEST", {
|
||||
message: TWO_FACTOR_ERROR_CODES.TOTP_NOT_ENABLED,
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BetterAuthClientPlugin, Store } from "better-auth";
|
||||
import { BetterAuthClientPlugin, Store } from "better-auth/types";
|
||||
import * as Browser from "expo-web-browser";
|
||||
import * as Linking from "expo-linking";
|
||||
import { Platform } from "react-native";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BetterAuthPlugin } from "better-auth";
|
||||
import type { BetterAuthPlugin } from "better-auth/types";
|
||||
import { createAuthMiddleware } from "better-auth/api";
|
||||
|
||||
export interface ExpoOptions {
|
||||
|
||||
Reference in New Issue
Block a user