refactor: v2 origin check error message (#15143)

This commit is contained in:
Lauris Skraucis authored and GitHub committed 2024-05-21 15:35:27 +00:00
1 parent cfc157b665
commit c3638eb990
1 file changed
+3 -1
@@ -38,7 +38,9 @@ export class AccessTokenStrategy extends PassportStrategy(BaseStrategy, "access-
}
if (requestOrigin && !client.redirectUris.some((uri) => uri.startsWith(requestOrigin))) {
throw new UnauthorizedException("Invalid request origin");
throw new UnauthorizedException(
`Invalid request origin - please open https://app.cal.com/settings/platform and add the origin '${requestOrigin}' to the 'Redirect uris' of your OAuth client.`
);
}
const ownerId = await this.tokensRepository.getAccessTokenOwnerId(accessToken);