Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: LinkedIn URL missed inside the user profile API #1256

Closed
2 tasks done
BaseMax opened this issue Jun 10, 2023 · 8 comments
Closed
2 tasks done

Bug: LinkedIn URL missed inside the user profile API #1256

BaseMax opened this issue Jun 10, 2023 · 8 comments
Assignees
Labels
🍕 enhancement New feature or request

Comments

@BaseMax
Copy link

BaseMax commented Jun 10, 2023

Describe the bug

https://api.opensauced.pizza/v1/users/BaseMax

{
  "id": 2658040,
  "open_issues": 179,
  "created_at": "2012-10-26T15:18:10.000Z",
  "updated_at": "2023-06-09T22:28:43.903Z",
  "first_opened_pr_at": "2016-07-14T08:22:17.000Z",
  "first_pushed_commit_at": "2016-07-14T08:23:15.000Z",
  "connected_at": "2022-11-22T05:56:44.136Z",
  "node_id": "MDQ6VXNlcjI2NTgwNDA=",
  "avatar_url": "https://avatars.githubusercontent.com/u/2658040?u=437bc80a2311b5cad36fe3b8921da3b8167b2ae3&v=4",
  "gravatar_id": "",
  "url": "https://github.com/BaseMax",
  "login": "BaseMax",
  "is_private": true,
  "is_open_sauced_member": true,
  "is_onboarded": false,
  "is_waitlisted": false,
  "role": 10,
  "bio": "Open Source Maintainer.\r\nFull-Time Open-Sourcerer.\r\nFull-stack programmer. In the path of a real computer engineer... (Compiler enthusiast)",
  "blog": "https://maxbase.org/",
  "name": "Max Base",
  "twitter_username": "MaxProgram",
  "linkedin_url": "",
  "github_sponsors_url": "",
  "company": "@GitHub Open Source Maintainer",
  "location": "The Internet, Remote",
  "display_local_time": false,
  "interests": "javascript",
  "hireable": true,
  "public_repos": 632,
  "public_gists": 2,
  "followers": 5259,
  "following": 2,
  "type": "User",
  "display_email": false,
  "receive_collaboration": false,
  "timezone": "UTC+1",
  "languages": {
    "Go": 535,
    "C++": 163736,
    "CSS": 61448,
    "PHP": 357441,
    "QML": 51989,
    "HTML": 66748,
    "Ruby": 267,
    "Rust": 30042,
    "Blade": 81006,
    "CMake": 46900,
    "Python": 16944,
    "Dockerfile": 1393,
    "JavaScript": 53745,
    "TypeScript": 284381
  }
}

Steps to reproduce

  1. Go to https://api.opensauced.pizza/v1/users/BaseMax
  2. Check the response

Browsers

Chrome

Additional context (Is this in dev or production?)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@BaseMax BaseMax added 🐛 bug Something isn't working 👀 needs triage labels Jun 10, 2023
@brandonroberts
Copy link
Contributor

Thanks @BaseMax. The LinkedIn URL is not part of the data we receive when you connect your GitHub account. You can update it in your User Settings and it will be reflected in the API request.

We can look at it as something to add in the future

@brandonroberts brandonroberts added 🍕 enhancement New feature or request and removed 🐛 bug Something isn't working 👀 needs triage labels Jun 12, 2023
@a0m0rajab
Copy link
Contributor

@brandonroberts it's possible to use this: https://api.github.com/users/a0m0rajab/social_accounts to
get the related information
If it's related to the API, I would like to see how to add it there though.

@BaseMax
Copy link
Author

BaseMax commented Jun 14, 2023

Nice, so for my account here is the URL:
https://api.github.com/users/basemax/social_accounts

// 20230615005642
// https://api.github.com/users/basemax/social_accounts

[
  {
    "provider": "twitter",
    "url": "https://twitter.com/MaxProgram"
  },
  {
    "provider": "linkedin",
    "url": "https://www.linkedin.com/in/maxbase/"
  },
  {
    "provider": "generic",
    "url": "https://t.me/MAX_BASE"
  },
  {
    "provider": "youtube",
    "url": "https://www.youtube.com/@maxbase4600/"
  }
]

@babblebey
Copy link
Contributor

I'll .take this

@babblebey
Copy link
Contributor

@brandonroberts

The LinkedIn URL is not part of the data we receive when you connect your GitHub account.

I see a way to implement this, but is there a chance that this is best implemented via API/through GitHub OAuth permissions i.e. read/receive more user info within the read:user scope?!

@a0m0rajab
Copy link
Contributor

@babblebey could you check how to implement the option you have on your mind?

Just an option: another option is to get the data from the GraphQL as well, with this query:

{
  viewer {
    login
    socialAccounts(first: 10) {
      edges {
        node {
          displayName
          url
          provider
        }
      }
    }
  }
}

https://docs.github.com/en/graphql/overview/explorer

@babblebey
Copy link
Contributor

I intend to leverage the updateUser endpoint coupled with the response from the api.github.com/users/[user_login]/social_accounts inside the handleGithubAuth function on the start route during Onboarding.

We await response data from the signIn function, take the username from the response, query the for the social_accounts for the username then call the updaterUser with the available accounts for appropriation.

What do you think @a0m0rajab?

@OgDev-01
Copy link
Contributor

I'll be closing this until we are clear if this is relevant and have a clear context on how to approach it 👍

@OgDev-01 OgDev-01 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍕 enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

5 participants