Connecting applications

The products of the family, other Laravel applications, and any OpenID Connect client.

The products of the family (built-in single sign-on)#

Boogle, Hackly, IndieStats, Johnny, Newsletter and Studio speak OpenID Connect natively: no package to install.

  1. On Checkin, Register application with the redirect URI the product shows ({product}/auth/sso/checkin/callback, the name of the provider in the product) and, for the launcher, the launch URL {product}/auth/sso/checkin. Copy the client id and the secret.
  2. In the product, Single sign-on → Add provider → Checkin: issuer = Checkin's URL (https://checkin.example.com), client id and secret, scopes openid profile email roles.
  3. Roles: Role claim roles, then one rule per value — for example admin → Administrator, member → Member (Boogle), pm → PM, client → Client (Studio). Give each person their roles on Checkin (Applications → Roles), or default roles to everyone. Turn on Keep roles in sync to apply them at every sign-in (the last administrator of the product is never demoted). Hackly and Johnny have no roles — whoever signs in administers them —: set them to Assigned people only on Checkin and assign the people who may.
  4. Leave Ask for the second factor of the product off: Checkin already asked for one (amr contains mfa). With Single sign-on only, passwords stay for the product's administrators.

The same settings fit the .env of every product: SSO_OIDC_ISSUER, SSO_OIDC_CLIENT_ID, SSO_OIDC_CLIENT_SECRET, SSO_OIDC_SCOPES="openid profile email roles", SSO_OIDC_ROLE_CLAIM=roles, SSO_OIDC_ROLE_MAP="admin=admin,member=member".

Other Laravel apps (the client package)#

For a Laravel application that has no single sign-on of its own, the companion package adds the button, the callback and the account linking:

Terminal
composer require andreapollastri/checkin-client
php artisan checkin:install && php artisan migrate
.env
CHECKIN_URL=https://checkin.example.com
CHECKIN_CLIENT_ID=…
CHECKIN_CLIENT_SECRET=…

Register the app on Checkin with redirect URI {app}/auth/checkin/callback and launch URL {app}/auth/checkin/redirect. Then add the button to the sign-in page:

blade
@if (\Checkin\Facade::isEnabled())
    <x-checkin-button class="…your button classes…" />
@endif
@error('checkin') <p class="text-sm text-red-600">{{ $message }}</p> @enderror

A Filament panel takes the plugin instead: ->plugin(\Checkin\Filament\CheckinPlugin::make()), with ->label(), ->before(), ->color(), ->icon(), ->divider(false). Sign-ins through Checkin skip the application's own second factor (Checkin verified one); listen to Checkin\Events\LoggedIn if the application keeps its own flag. New people get the application's default role; CHECKIN_AUTO_CREATE_USERS=false makes the package sign in only the people who already have an account. Package documentation: checkin-client README.

Local development#

php artisan db:seed on Checkin registers Studio, Hackly, Boogle, IndieStats, Newsletter and Johnny with fixed credentials, the launch URL https://{app}.test/auth/sso/checkin, and these callback origins: https://{app}.test, http://{app}.test, http://localhost, http://localhost:8000, http://127.0.0.1:8000, http://127.0.0.1:8765. Paste the printed SSO_OIDC_* lines in each product's .env with SSO_OIDC_ISSUER=https://checkin.test (an application with the package: CHECKIN_* with CHECKIN_URL=https://checkin.test, then php artisan checkin:status in it).

Checkin itself must run over HTTPS (herd secure checkin) for passkeys; the applications may stay on HTTP locally.

Third-party OpenID Connect clients#

Any client that supports discovery works. Typical settings:

SettingValue
Issuer / discovery URLhttps://checkin.example.com / https://checkin.example.com/.well-known/openid-configuration
Client id / secretfrom the admin panel
Scopesopenid profile email (and roles for the roles claim)
Redirect URIthe one the tool documents, registered exactly on Checkin
Username claimpreferred_username or email; user id claim sub
PKCES256

Examples: Grafana ([auth.generic_oauth], auth_url/token_url/api_url from discovery), Portainer (OAuth → Custom), Gitea/Forgejo (OpenID Connect), Nextcloud (user_oidc), Proxmox (OpenID Connect realm), Outline, MinIO. Mark these applications untrusted if you want people to see the consent screen the first time.

Switching an app from the path repository to the published package#

Local projects point composer.json to ../checkin-client (repositories → path). Once the package is on Packagist (or reachable as a VCS repository), remove the repositories entry and require a version: composer require andreapollastri/checkin-client:^1.0.