Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

ntsim
Copy link
Contributor

@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

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 Allow auth provider selection using provider query parameter Allow auth identity provider selection using provider query parameter Sep 12, 2018
@ntsim ntsim mentioned this pull request Sep 12, 2018
@VincentTam
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants