Conversation
|
Just tried this out @mislav and it works, I love it 💯💯💯 |
Discovered by a stay-at-home developer!
This is for extra security during OAuth flow.
The config file is now `~/.config/gh`.
|
This is now wired up with the rest of the app and ready for review! The config file is
|
|
|
||
| // TODO: figure out how to enable using the "api" package here | ||
| // | ||
| // Right now "api" is coupled to "context", so we can't import "api" from here. |
There was a problem hiding this comment.
I've discovered that I can't import "api" from here to gain access to the GraphQL() function because "api" already depends on "context", and that would create a circular dependency which Go compiler strictly forbids.
I'm not happy with this file and that I had to reimplement large parts of GraphQL logic. Going forward, let's figure out how to eliminate this circular dependency please!
|
https://github.com/login/oauth/authorize?...opens;localhost:<port>(port is random each time);?code=...;codeforaccess_tokenby POSTing tohttps://github.com/login/oauth/access_token.You can verify that the authorization token you've just obtained works:
TODO:
state;stateupon request to localhost;Figure out where to securely store the tokenIt is in~/.config/ghfor now.