13 Commits

Author SHA1 Message Date
66a76a0767 Revert "Use flutter_web_auth instead of our own OAuth mechanism"
This reverts commit 763cbf8493c610dec0e7e344bee40ad331e7a272.
This reverts commit ddad699b259bafe6c7ed630e7afc2eb38b7825e6.

This is causing way too many problems -

On Android with GitHub we occasionally get a User Cancelled exception.
On iOS this doesn't work < ios11

I prefer keeping my way till then. Even though it doesn't support
KeepAlive on Android.
2020-06-10 11:53:43 +02:00
ddad699b25 Fix flutter analyze 2020-06-09 18:56:51 +02:00
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