Skip to content

Commit

Permalink
add github_node_id to github token service
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-coding committed Oct 18, 2024
1 parent 7d6617d commit a9c971f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/src/strategies/github-token/github-token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export class GithubTokenStrategyService extends Strategy {
override getImsUserTemplatedValuesForLoginData(loginData: UserLoginData): object {
return {
github_id: loginData.data["github_id"],
github_node_id: loginData.data["github_node_id"],
username: loginData.data["username"],
displayName: loginData.data["displayName"],
email: loginData.data["email"],
Expand All @@ -102,6 +103,7 @@ export class GithubTokenStrategyService extends Strategy {
override getLoginDataDataForImsUserTemplatedFields(imsUser: object): object | Promise<object> {
return {
github_id: imsUser["github_id"],
github_node_id: imsUser["github_node_id"],
};
}

Expand All @@ -119,7 +121,8 @@ export class GithubTokenStrategyService extends Strategy {
token: string,
strategyInstance: StrategyInstance,
): Promise<{
github_id: string;
github_id: number;
github_node_id: string;
username: string;
displayName: string;
email: string;
Expand All @@ -129,6 +132,7 @@ export class GithubTokenStrategyService extends Strategy {
{
viewer {
id
databaseId
login
name
email
Expand All @@ -152,7 +156,8 @@ export class GithubTokenStrategyService extends Strategy {
const userData = data.data.viewer;

return {
github_id: userData.id,
github_id: userData.databaseId,
github_node_id: userData.id,
username: userData.login,
displayName: userData.name,
email: userData.email,
Expand Down

0 comments on commit a9c971f

Please sign in to comment.