New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow auth identity provider selection using `provider` query parameter #231

Open
wants to merge 2 commits into
base: dev
from

Conversation

Projects
None yet
2 participants
@ntsim

ntsim commented Sep 12, 2018

This is a continuation of pull request #219 and is a result of it's consequent discussion.

Currently the /auth endpoint will only allow authentication with the same service provider that the site repository is hosted on. For example, a commenter can only authenticate with GitHub if the repository is on GitHub, similarly with GitLab.

This pull request adds the provider query parameter to the /auth endpoint allowing the user to specify whatever identity provider they wish to use (and that we offer an integration with). This is important as it opens up multiple authentication options for commenters and allow us to extend the number of available providers in the future. An example usage might look like:

GET /v3/auth/github/johndoe/test-repository?provider=gitlab&code=the-auth-code

ntsim added some commits Sep 12, 2018

Add `provider` query parameter for `/auth` endpoint
This commit adds the `provider` query parameter to allow users to select
the specific authentication provider they wish to use when authenticating
through Staticman.

This is useful in situations where the site repository is hosted on a
different provider to the authentication provider. For example, if the
site is hosted on GitHub, but the commenter wishes to sign in through
GitLab. Consequently, this is a prerequisite to adding additional
authentication providers in the future.

@ntsim ntsim changed the title from Allow auth provider selection using `provider` query parameter to Allow auth identity provider selection using `provider` query parameter Sep 12, 2018

@ntsim ntsim referenced this pull request Sep 12, 2018

Merged

Add GitLab support #219

@VincentTam

This comment has been minimized.

VincentTam commented Nov 18, 2018

I've incorporated this PR at f9675f9 to my testing API instance for others to test. I've not tested it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment