Skip to content

Commit

Permalink
github node id
Browse files Browse the repository at this point in the history
  • Loading branch information
chriku committed Oct 18, 2024
1 parent ad5304b commit db1319c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/src/backend-services/ims-user-finding.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export class ImsUserFindingService {
email?: string;
},
): Promise<UserLoginData | null> {
console.log(matchingInstance, matchingStrategy, imsUserTemplatedValues, imsUser);
const requiredLoginDataData = matchingStrategy.getLoginDataDataForImsUserTemplatedFields({
...imsUserTemplatedValues,
id: imsUser.id,
Expand Down
4 changes: 3 additions & 1 deletion backend/src/strategies/github/github.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class GithubStrategyService extends StrategyUsingPassport {

override async getSyncDataForLoginData(
loginData: UserLoginData,
): Promise<{ token: string | null; [key: string]: any }> {
): Promise<{ token: string | null;[key: string]: any }> {
const syncLogins = (
await this.activeLoginService.findValidForLoginDataSortedByExpiration(loginData, true)
).filter((login) => !!login.data["accessToken"]);
Expand Down Expand Up @@ -189,11 +189,13 @@ export class GithubStrategyService extends StrategyUsingPassport {
const dataUserLoginData = {
username,
github_id: parseInt(profile.id),
github_node_id: profile.nodeId,
email: profile.emails?.[0]?.value,
displayName: profile.displayName,
};
const loginDataCandidates = await this.loginDataService.findForStrategyWithDataContaining(strategyInstance, {
github_id: parseInt(profile.id),
github_node_id: profile.nodeId,
});
if (loginDataCandidates.length != 1) {
this.loggerGithub.debug("Oauth login didn't find unique login data", loginDataCandidates);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export class JiraTokenDatacenterStrategyService extends Strategy {
);

if (!response.ok) {
console.log(response.status);
console.log(await response.text());
console.log(combineURL("rest/api/2/myself", strategyInstance.instanceConfig["imsTemplatedFieldsFilter"]["root-url"]))
return null;
}

Expand Down

0 comments on commit db1319c

Please sign in to comment.