From 5578d7e26e1f391debcb40327dda7abf061e07d0 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 7 Sep 2023 15:39:27 +0530 Subject: [PATCH] fix: account linking stats (#117) --- .../io/supertokens/pluginInterface/ActiveUsersStorage.java | 2 ++ .../pluginInterface/authRecipe/AuthRecipeStorage.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/io/supertokens/pluginInterface/ActiveUsersStorage.java b/src/main/java/io/supertokens/pluginInterface/ActiveUsersStorage.java index 497186f0..9f4e3252 100644 --- a/src/main/java/io/supertokens/pluginInterface/ActiveUsersStorage.java +++ b/src/main/java/io/supertokens/pluginInterface/ActiveUsersStorage.java @@ -20,4 +20,6 @@ public interface ActiveUsersStorage extends NonAuthRecipeStorage { void deleteUserActive_Transaction(TransactionConnection con, AppIdentifier appIdentifier, String userId) throws StorageQueryException; + + int countUsersThatHaveMoreThanOneLoginMethodAndActiveSince(AppIdentifier appIdentifier, long sinceTime) throws StorageQueryException; } diff --git a/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeStorage.java b/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeStorage.java index 182f5254..f554ffab 100644 --- a/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeStorage.java +++ b/src/main/java/io/supertokens/pluginInterface/authRecipe/AuthRecipeStorage.java @@ -60,4 +60,8 @@ AuthRecipeUserInfo[] listPrimaryUsersByThirdPartyInfo(AppIdentifier appIdentifie AuthRecipeUserInfo getPrimaryUserByThirdPartyInfo(TenantIdentifier tenantIdentifier, String thirdPartyId, String thirdPartyUserId) throws StorageQueryException; + + boolean checkIfUsesAccountLinking(AppIdentifier appIdentifier) throws StorageQueryException; + + int getUsersCountWithMoreThanOneLoginMethod(AppIdentifier appIdentifier) throws StorageQueryException; }