mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 02:26:40 +00:00
Merge pull request #4852 from Infisical/hotfix/event-subscription-with-token
hotfix: event subscription not working with identity token
This commit is contained in:
@@ -182,8 +182,8 @@ export const injectIdentity = fp(
|
|||||||
case AuthMode.IDENTITY_ACCESS_TOKEN: {
|
case AuthMode.IDENTITY_ACCESS_TOKEN: {
|
||||||
const identity = await server.services.identityAccessToken.fnValidateIdentityAccessToken(
|
const identity = await server.services.identityAccessToken.fnValidateIdentityAccessToken(
|
||||||
token,
|
token,
|
||||||
subOrganizationSelector,
|
req.realIp,
|
||||||
req.realIp
|
subOrganizationSelector
|
||||||
);
|
);
|
||||||
const serverCfg = await getServerCfg();
|
const serverCfg = await getServerCfg();
|
||||||
requestContext.set("orgId", identity.orgId);
|
requestContext.set("orgId", identity.orgId);
|
||||||
|
|||||||
@@ -186,8 +186,8 @@ export const identityAccessTokenServiceFactory = ({
|
|||||||
|
|
||||||
const fnValidateIdentityAccessToken = async (
|
const fnValidateIdentityAccessToken = async (
|
||||||
token: TIdentityAccessTokenJwtPayload,
|
token: TIdentityAccessTokenJwtPayload,
|
||||||
subOrganizationSelector?: string,
|
ipAddress?: string,
|
||||||
ipAddress?: string
|
subOrganizationSelector?: string
|
||||||
) => {
|
) => {
|
||||||
const identityAccessToken = await identityAccessTokenDAL.findOne({
|
const identityAccessToken = await identityAccessTokenDAL.findOne({
|
||||||
[`${TableName.IdentityAccessToken}.id` as "id"]: token.identityAccessTokenId,
|
[`${TableName.IdentityAccessToken}.id` as "id"]: token.identityAccessTokenId,
|
||||||
|
|||||||
Reference in New Issue
Block a user