diff --git a/lib/build/recipe/thirdparty/providers/custom.js b/lib/build/recipe/thirdparty/providers/custom.js index 05f58e611..00bd49278 100644 --- a/lib/build/recipe/thirdparty/providers/custom.js +++ b/lib/build/recipe/thirdparty/providers/custom.js @@ -354,7 +354,7 @@ function NewProvider(input) { */ if (impl.config.validateAccessToken !== undefined) { yield impl.config.validateAccessToken({ - accessTokenPayload: rawUserInfoFromProvider.fromUserInfoAPI, + accessToken: accessToken, clientConfig: impl.config, userContext, }); diff --git a/lib/build/recipe/thirdparty/types.d.ts b/lib/build/recipe/thirdparty/types.d.ts index a5b666382..fd51d8d07 100644 --- a/lib/build/recipe/thirdparty/types.d.ts +++ b/lib/build/recipe/thirdparty/types.d.ts @@ -80,9 +80,7 @@ declare type CommonProviderConfig = { * @param input.userContext Refer to https://supertokens.com/docs/thirdparty/advanced-customizations/user-context */ validateAccessToken?: (input: { - accessTokenPayload: { - [key: string]: any; - }; + accessToken: string; clientConfig: ProviderConfigForClientType; userContext: any; }) => Promise; diff --git a/lib/ts/recipe/thirdparty/providers/custom.ts b/lib/ts/recipe/thirdparty/providers/custom.ts index 6b5fc9531..b6e2ff849 100644 --- a/lib/ts/recipe/thirdparty/providers/custom.ts +++ b/lib/ts/recipe/thirdparty/providers/custom.ts @@ -342,7 +342,7 @@ export default function NewProvider(input: ProviderInput): TypeProvider { */ if (impl.config.validateAccessToken !== undefined) { await impl.config.validateAccessToken({ - accessTokenPayload: rawUserInfoFromProvider.fromUserInfoAPI, + accessToken: accessToken, clientConfig: impl.config, userContext, }); diff --git a/lib/ts/recipe/thirdparty/types.ts b/lib/ts/recipe/thirdparty/types.ts index 30a659fec..750d44d3d 100644 --- a/lib/ts/recipe/thirdparty/types.ts +++ b/lib/ts/recipe/thirdparty/types.ts @@ -77,7 +77,7 @@ type CommonProviderConfig = { * @param input.userContext Refer to https://supertokens.com/docs/thirdparty/advanced-customizations/user-context */ validateAccessToken?: (input: { - accessTokenPayload: { [key: string]: any }; + accessToken: string; clientConfig: ProviderConfigForClientType; userContext: any; }) => Promise;