Skip to content

Instantly share code, notes, and snippets.

View danielsilverstone-ct's full-sized avatar

Daniel Silverstone danielsilverstone-ct

View GitHub Profile

Redeemable app tokens

Justification

In order to permit authors/owners of pay-for Flatpaks to issue access to people, perhaps for testing, or for other development purposes; or even because they themselves need to install their own flatpak via Flathub for some reason, we need to be able to issue application tokens, keys, whatever we want to call them.

Reasoning

As part of supporting donation (and purchase) for apps in Flathub, each app (and platform) needs to be able to set their minimum and recommended values, and the cut given to their dependencies.

This document is intended to lay out how this might work, along with a proposed algorithm to turn a "pay X to app Y" into a transaction which divides the funds appropriately.

Wallet related API etc.

The 'wallet' APIs are related to making donations/purchases (and receiving money).

A user's wallet may have any of the following in it:

  • Consumer card information - one or more "card"s which correspond to a Stripe payment method.
  • Provider account information - a singular connected Stripe express account

The goal

The goal of enabling some kind of financial integration for flathub.org is to permit a combination of donations and payments for flatpak applications and platforms.

Financial integration will permit application developers to designate apps as being pay-for, or to indicate how donations to their flatpak should be disbursed. In addition it will allow flathub.org to receive donations to assist with hosting and other costs.

@danielsilverstone-ct
danielsilverstone-ct / flathub-auth.md
Last active February 4, 2022 15:29
Authentication for Flathub backend

Why have authentication?

We wish for flathub.org to provide a mechanism for developers to log in and manage their flatpaks and later payment mechanisms etc. Later we will want non-developers to also be able to log in, in order to manage their subscriptions or sponsorships etc.

To that end we need the concept of users on flathub.org and to tie that to some authentication mechanism(s). Since developers must have a Github account in order to have submitted a flatpak to flathub, we can use Github to authenticate