RealDevSquad / RealDevSquad/website-backend
(bug) : not able to login using locally using github callback
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Description
- little context Vaishali was not able to connect her github and create a local user, so while helping her I found out this bug
- will investigate and add the details latter, currently just wrote it down here to not forget
controllers/auth.js line 175
// if (!userData.email) {
// const githubBaseUrl = config.get("githubApi.baseUrl");
// const res = await fetch(`${githubBaseUrl}/user/emails`, {
// headers: {
// Authorization: `token ${accessToken}`,
// },
// });
// const emails = await res.json();
// const primaryEmails = emails.filter((item) => item.primary);
// if (primaryEmails.length > 0) {
// userData.email = primaryEmails[0].email;
// }
// }
After commenting these lines the it worked
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in controllers/auth.js around line 175 and inspect the GitHub callback and the commented email lookup. Reproduce local login with GitHub and determine why the callback cannot create a local user. Done means the callback creates the user successfully without commenting out the email-handling code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, javascript
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100