11 Commits

Author SHA1 Message Date
ffc0af12a3 Enable prefer_const_constructors 2019-10-20 01:11:53 +01:00
57b37399ef OAuthApp: Add a main
This way we can easily run it
2019-10-11 16:17:27 +02:00
e389829e2c Fix flutter analyze
Proper type checking is awesome.
2019-06-02 17:20:40 +02:00
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
bfcfa3b449 Add a GitHost factory
There are probably more idiomatic ways of doing this, but I'm not sure
how.
2019-01-25 11:28:38 +01:00
ac5c2be05d Add a GitHost interface
GitLab and GitHost are two implementations of that interface.
2019-01-25 11:21:58 +01:00
f8a066d5d9 Add API for GitLab
It's so awesome that I don't need to store the client secret with
GitLab. The GitHub APIs are so much easier to use + documentation, but
at least GitLab supports more OAuth methods.
2019-01-24 18:19:50 +01:00
d87085ac29 GitHub API: Refactor it into a class 2019-01-24 15:28:04 +01:00
fbdb4d61ed Add an OAuth GitHub api
This just models the basic API that we need for GitJournal. The API
isn't great and could use improvement.

Also, yes, I know I'm committing the secret key, but I don't see any
other way of managing this. GitHub doesn't allow the implicit oauth flow
or dynamic clients registration or anything. So there isn't really any
other way.
2019-01-24 13:50:06 +01:00
a25deb2b0c Fix unused imports 2019-01-23 23:58:52 +01:00
c2e49bb630 Add a POC OAuth client implementation
I've registered GitJournal as an app on Github and tried to get the
access_token within the app. This seems to work. Though, I need to
provide the client secret as well. It's quite sad that GitHub does not
even support the Implicit Grant auth type.

Credit: https://stackoverflow.com/questions/46196240/oauth2-flow-in-flutter-app
2019-01-23 20:20:22 +01:00