meteorlxy / vssue

:mailbox: A Vue-powered Issue-based Comment Plugin
https://vssue.js.org
MIT License
773 stars 106 forks source link

Consider to provide GitLab Implicit Grant #22

Closed timaschew closed 5 years ago

timaschew commented 5 years ago

GitLab provides an Implicit Grant which doesn't require to expose any clientSecret.

Netlifycms is using it for instance: https://www.netlifycms.org/docs/authentication-backends/#gitlab-backend

meteorlxy commented 5 years ago

Thanks for advice, this could be an optional feature.

We should add an option to allow user enable it, or to set options for a certian platform / api.

E.g.:

options: {
  api: GitlabV4,
  apiConfig: { authType: 'token' },
}

https://docs.gitlab.com/ce/api/oauth2.html#implicit-grant-flow

meteorlxy commented 5 years ago

After some consideration, I think we could make it as the default behavior of GitLab API.

I'll try to implement it in the next minor version.

Could you please give some further advice on that? 😄 @timaschew

meteorlxy commented 5 years ago

I didn't notice that both GitLab and Bitbucket have supported Implicit Grant Type, and only GitHub does not support it yet.

(At first I mainly use the GitHub API to determine how the Vssue flow works)

meteorlxy commented 5 years ago

Close in v0.8.0

timaschew commented 5 years ago

Wow, that was fast! Great job!

timaschew commented 5 years ago

BTW: I cannot see any comments until I login for GitLab, for every other provider it works.
Not sure if this behaviour was present before 0.8.0 or not.

meteorlxy commented 5 years ago

You can check the supported-platform page in the docs. GitLab requires login to get the comments (strange, though)