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

Don't Merge! Proof of Concept: Using the Boost Site as an OAuth Provider #897

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

williln
Copy link
Collaborator

@williln williln commented Jan 24, 2024

Ticket: #887. CCC @frankwiles @sdarwin

Do not merge -- that would add a "log in with Boost!" button that would be confusing.

Task: Demonstrate how to use Boost as an OAuth provider by creating an OAuth app in the staging site, then adding Boost Staging as a social provider (like Google and GitHub) in my local site.

These resources were helpful in setting up Boost Staging as an OAuth provider in my local environment:

Note: I know we won't have a "Log in with Boost!" button on the sign up page -- that would be odd. It was the best way to test, though.

Instructions

  1. In the consuming project (the mailman project, for example), add a providers app
  2. Subclass OAuth2Provider in providers/provider.py to create the custom Boost provider
  3. Subclass OAuth2Adapter in providers/views.py to create the custom Boost provider login flow
  4. Hook up the URLs
  5. (demo only) Add the Boost provider to the login options
  6. Create a fresh user in Staging
  7. Start your local server
  8. Use your staging user and the Boost provider to log into your localhost site

Outstanding problems

The oauth toolkit default is now to use PCKE: https://django-oauth-toolkit.readthedocs.io/en/latest/getting_started.html#authorization-code, which I am having trouble implementing. There is a setting we can add to turn it off, but PCKE is the new standard. Update: After talking with Frank, it seems we'd probably disable PCKE via a setting.

Video:

boost_oauth_provider_progress.mov

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.

2 participants