With Github's new
Github Sponsors program, Github developers can choose to sponsor open source projects.
This plugin is designed to help those wishing to monetize according to the 'sponsorware' pattern specified by Caleb Porzio:
https://calebporzio.com/i-just-hit-dollar-100000yr-on-github-sponsors-heres-how-i-did-it
Specifically it is to help with "Phase 3: Sponsored Screencasts".
This plugin utilizes Github OAuth and calls the Github API to gatekeep specified videos to only Github Users, with the option to require sponsorship to a particular organization or user.
The plugin utilizes the built-in HTML5 video player, by embedding (when the user is authorized) a video and source element.
The plugin adds an editor block to include in posts and a custom post type that specifies the necessary information for each video.
- The "Installation" section has information on setting up the plugin properly, as well as plugin-wide settings.
- The "FAQ" is empty currently. This will grow as we get actual questions from the community upon release.
- The "Creating an Authenticated Video" section covers adding a video that is behind Github authentication.
- The "Screenshots" section shows the admin section pages as well default examples of the video and auth screens.
- The "Limitations/Future Features" section contains info on some features that are desirable and their relative priority, as well as current limitations of the plugin.
About Us
We have developed the open-source
Opensheetmusicdisplay: A library for rendering MusicXML in the browser using Vexflow.
We developed this plugin to help us more easily create sponsor-specific screencasts.
We are making it available here free to give back to the sponsorware community and pay it forward.
We hope you find this plugin useful, and if so, please consider sponsoring us or donating at our link above.
Thank you!
- Install the plugin via the Wordpress Plugin installer.
- In the Wordpress admin sidebar, navigate to Plugins -> Add New.
- Wordpress Automatic Installation
- Search for its listing near the top of this page: "Authenticate Sponsorware Videos via GitHub".
- Review the plugin information, reviews, details, etc.
- Click "Install Now" and Wordpress will automatically install it.
- or Manual Upload
- At the very top towards the left, select the "Upload Plugin" button.
- Select the zip file for this plugin.
- Click "Install Now"
- Activate the Plugin
- In the Wordpress admin sidebar, navigate to Plugins -> Installed Plugins
- Locate the "Authenticate Sponsorware Videos via GitHub" plugin in this list
- Select "Activate" beneath it
- Specify the requisite settings
- A new entry will have appeared at the bottom of your admin sidebar: "Github Video" (you may need to refresh the page)
- Hover over this entry and select "Settings" from the submenu.
- Fill in the Client ID, Client Secret and Private Key settings, see "Settings Information" below (these are required for the authentication to work).
Settings Information
Github Setup
Since the plugin utilizes Github OAuth to verify users sponsorship status, you must setup a Github OAuth app.
It is quite straightforward to do and Github has a good guide for it
here.
Make the application name and description whatever you like; Something that will tell users it's for your Github Sponsor videos.
The homepage URL will be the root URL of your Wordpress site where the videos will be. So let's say your site is at:
https://www.wordpress-example-url.com
This is what you would enter in the Homepage URL field. (**NOTE: It is recommended to include the scheme, either http or https, of your server)
IMPORTANT: READ OR PLUGIN WILL NOT WORK
The Authorization callback URL
must be a specific structure for the plugin to work correctly. You must append the query param:
?githubauthvideo_auth=2
to your root url. So using our above example, the Authorization Callback URL should be:
https://www.wordpress-example-url.com?githubauthvideo_auth=2
.
After you register the application, you can get the Client ID from the applications settings page, and also generate the Client Secret. (You should be taken to this page after register, but it can also be navigated to here:
https://github.com/settings/developers)
- Copy and pase the Client ID from your Github OAuth application page to the "Github App Client ID" field in the plugin settings page (Wordpress).
- Click "Generate a new client secret" on the Github OAuth application page to generate a new secret, and copy that as well into the "Github App Client Secret" field on the plugin settings page.
Private Key for Session Generation
Generate a random Base64 key for the Private Key For Session Generation field. This must be a base64 string, and should be long and random.
Use your favorite generator, or this one works (note: it is recommended to use in offline mode): https://generate.plus/en/base64. We require at least 32 characters.
This is used to cryptographically sign information (in a
JWT) from the Wordpress server during Github Authentication.
This is an extra layer of security to ensure that no other application is attempting to forge access requests to the Wordpress server.
Optional Settings
The remaining settings are optional.
Ignore Sponsorship status
When this is enabled the script will merely check if the user is authenticated with Github to allow them to access videos, and will not check sponsorship status.
Do not Require HTTPS
Normally the plugin requires the server to have HTTPS enabled, and will not perform authentication without it. Check this to disable this requirement.
It is highly recommended you use HTTPS on any production server. This setting should only be utilized in development environments
Use Server-Side Rendering for Player
By default the plugin will render an HTML placeholder for Sponsor videos and check the sponsorship status client-side with Javascript to properly render the correct screen (or video).
This is to remain compatible with as many hosting providers as possible.
Some hosts, especially those for high performance hosting (e.g. Kinsta) will utilize response caching, making this client-side behavior necessary to properly render the videos.
If your host does not do this, you can toggle this setting to render server-side instead if prefered (essentially minor processing will occur on the server instead of client).
1.2.2
*Testing on 6.1.1, update to the latest npm packages for security fixes, etc.
1.2.1
- Further fixes for proxy issues. *
1.2.0
- Fix proxy issues - Properly stream videos from a specified host.
1.1.2
- If no video is specified, still render the text description.
- Allow iframe embeds in text description
1.1.1
- Fix issue with Github token changes.
We no longer try to sanity check github tokens since they can (and did) change in structure.
1.1.0