fission-codes / auth-lobby

The authentication service that Fission services run.
https://auth.fission.codes
GNU Affero General Public License v3.0
12 stars 1 forks source link
elm elm-lang fission ucan

UI for auth.fission.codes

How does it work?

βš—οΈ This SPA allows you to:

πŸ”‘ For each of those, you have to pass the required query parameters:

After that, you need at least one of these resources:

You can define some optional parameters as well:

https://auth.fission.codes

& did=did:key:z13V3Sog2YaUKhd...
& redirectTo=https://my.app/
& sdk=0.23.0

& appFolder=Creator/My App              # `private/Apps/Creator/My App`
& privatePath=Documents/Invoices        # `private/Documents/Invoices`
& publicPath=Blog/Posts                 # `public/Blog/Posts`
& sharing=t                             # `shared/`

& lifetimeInSeconds=86400

πŸŽ’ When redirecting back it'll add the query params:

When the user decides to go back to the app for some reason (eg. not agreeing
with the authorisation), the query parameter cancelled=reason will be added.

Possible cancellation reasons:

Theming

By passing a theme query parameter you can adjust the look and text of the lobby. Note that when setting a custom logo, there will be a subtle reference to Fission added, to indicate that this is still a Fission service. The theme query param should be a URL or IPFS CID pointing to a JSON file with the following format:

{
  "introduction": "MARKDOWN",
  "logo": {
    "dark-scheme": "URL_TO_IMAGE_OR_CID",
    "light-scheme": "URL_TO_IMAGE_OR_CID",
    "styles": "OPTIONAL_CSS"
  }
}

So for example:

{
  "introduction": "Learn more about Fission on our [website](https://fission.codes).",
  "logo": {
    "dark-scheme": "https://auth.fission.codes/images/logo-light-colored.svg",
    "light-scheme": "https://auth.fission.codes/images/logo-dark-colored.svg",
    "styles": "width: 120px; padding-bottom: 10px"
  }
}

Development

This project uses Nix to manage the project's environment. If you'd like to build this project without Nix, check out the dependencies in the shell.nix file (most are available through Homebrew as well).

# Install javascript dependencies
just install-deps

# Build, serve, watch
just

# Production build
# (see Justfile for details)
just production-build

# Use a different config
just config=production