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

Fix documentation for Wikimedia SSO #511

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

HungNgien
Copy link
Collaborator

@HungNgien HungNgien commented Jan 16, 2025

image

image

This PR resolves #500

Summary by Sourcery

Update the documentation for setting up Wikimedia single sign-on (SSO) and correct the callback URL for Google, GitHub, and Wikimedia providers. Standardize the terminology used for client ID and secret across different providers in the settings.

Enhancements:

  • Use a fixed callback URL for Google, GitHub, and Wikimedia OAuth applications.

Documentation:

  • Improve instructions for setting up MediaWiki OAuth application by adding detailed steps and clarifying terminology.

Copy link

sourcery-ai bot commented Jan 16, 2025

Reviewer's Guide by Sourcery

This PR updates the documentation for setting up Wikimedia SSO and fixes the callback URL for Google, GitHub, and Wikimedia providers. It also updates the labels for client ID and secret in the admin settings.

Sequence diagram for SSO authentication flow

sequenceDiagram
    participant User as User
    participant App as Eventyay App
    participant Auth as OAuth Provider

    User->>App: Click Login with SSO
    App->>Auth: Redirect to OAuth provider
    Auth->>User: Show login page
    User->>Auth: Enter credentials
    Auth->>App: Redirect to callback URL with auth code
    Note right of App: Updated callback URLs:
    Note right of App: app.eventyay.com/tickets/accounts/
    Note right of App: {provider}/login/callback/
    App->>Auth: Exchange code for tokens
    Auth->>App: Return tokens
    App->>User: Complete login
Loading

File-Level Changes

Change Details Files
Updated documentation for Wikimedia SSO setup
  • Added detailed steps for registering an OAuth application on Wikimedia.
  • Included instructions for selecting specific permissions: Basic Rights and Access private information.
  • Clarified the terminology used for consumer token and secret, now referred to as client application key and secret.
  • Updated the copy on the next page to instruct the user to copy the client application key and secret after successful registration on Wikimedia.
src/pretix/plugins/socialauth/templates/socialauth/social_setup.html
Fixed callback URLs for Google, GitHub, and Wikimedia providers src/pretix/plugins/socialauth/templates/socialauth/social_setup.html
Updated client ID and secret labels in admin settings
  • Added conditional label for "Client ID" and "Secret" input fields based on provider. For Wikimedia, the labels are now "Client Application Key" and "Client Application Secret" respectively.
src/pretix/plugins/socialauth/templates/socialauth/social_auth_settings.html
Removed unused tickets_domain variable
  • Removed the tickets_domain variable from the get_context_data method as it is no longer used in the templates.
src/pretix/plugins/socialauth/views.py

Assessment against linked issues

Issue Objective Addressed Explanation
#500 Fix the description for the form elements for Wikimedia to: Client Application Key and Client Application Secret
#500 Update the documentation for Wikimedia OAuth application registration process with detailed steps
#500 Delete the sentence: 'Choose option: User identity verification only with access to real name and email address, no ability to read pages or act on a user's behalf.'

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@HungNgien HungNgien marked this pull request as ready for review January 16, 2025 08:29
@mariobehling
Copy link
Member

This feature should work independently from the domain where it is deployed.

@mariobehling mariobehling requested a review from hongquan January 17, 2025 05:24
@mariobehling mariobehling merged commit d75c72c into fossasia:development Jan 17, 2025
3 of 5 checks passed
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.

Fix documentation for Wikimedia SSO
3 participants