deepanjali19 / GitHub-Dashboard

A web based GitHub Dashboard for Seneca students working on Open Source Development.
MIT License
3 stars 9 forks source link

Issue 34 [In Progress] #39

Closed mphan6 closed 4 months ago

mphan6 commented 5 years ago

I decided to take a break from pie charts and tackle something else, but it turned out to be a bigger problem than I thought, so I thought I'd share for some possible input.

Here goes nothing: Issue: #34 Problem 1: According to GitHubDev, it seems like we've only done the first task with identifying a user. As shown in the link, after the initial login, a code is given in order to request an access token. We're suppose to make a post request with information privy to the application owner to retrieve and use this access token.

I went ahead and made my own dev settings to create an OAuth application to get my own secret.

Problem 2: Since we've retrieved and set our own access tokens, before we can access the Welcome page, there are attempts to make a call with the octokit/rest library. (Not that big of an issue once we get this stuff working)

Problem 3: I needed to cheese how to retrieve the code from the URL that we were redirected to by the initial GitHub login. I'm not sure if I'm doing something wrong or the routers aren't set properly, but apparently we should be able to access url parameters through this.props.

Problem 4: I don't know how to properly make this POST request due to known issues found here and here. I haven't tested in IE, but I did attempt to download the chrome extension and make the request with that on. I initially had the Allow-Origin issues, but after installing the chrome extension, I was receiving 404 bad requests. (These calls work through postman :( )

I can't quite remember what other issues I ran into, but I essentially just facerolled the keyboard trying to make things work, but this is all I could get to tonight.

If anyone has any suggestions I'd be very grateful~

FYI: This repo is the first time I've ever worked with react..