Implement Bookshare OAuth Integration for Print Disability Qualification Flow#11159
Draft
Implement Bookshare OAuth Integration for Print Disability Qualification Flow#11159
Conversation
Co-authored-by: mekarpeles <978325+mekarpeles@users.noreply.github.com>
…ntation Co-authored-by: mekarpeles <978325+mekarpeles@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement Bookshare OAuth Integration for Print Disability Qualification Flow
Implement Bookshare OAuth Integration for Print Disability Qualification Flow
Aug 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a complete OAuth integration with Bookshare that allows users with print disabilities to automatically qualify for special access on Open Library by connecting their Bookshare accounts during registration.
Overview
Previously, users who selected "BookShare" as their print disability authority had to go through a manual verification process via email. This implementation streamlines the qualification process by integrating directly with Bookshare's OAuth API to automatically verify eligibility.
Key Components
1. OAuth Client Implementation (
openlibrary/core/auth.py)2. Account Controllers (
openlibrary/plugins/upstream/account.py)account_bookshare: Handles OAuth initiation and callback processingaccount_bookshare_complete: Manages OAuth completion for users who weren't logged in during callback3. User Interface (
openlibrary/templates/account/bookshare.html)4. Registration Flow Integration
bookshare_oauth_pendingcookie for BookShare usersPDRequestStatus.REQUESTEDtoPDRequestStatus.FULFILLEDupon successful OAuth verificationUser Flow
/account/bookshareConfiguration
The integration requires Bookshare OAuth credentials to be added to
olsystem.yml:Security Considerations
Benefits
Fixes #11155.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.