package main // Exhibit 1. The whole of sign-in, for any app, is one call: `me, signed_in := rc.me()` (a User, or // a visitor). The second app here is the sample `zoo-broken`, plain PHP on php-fpm signing in through // account's shim, while the zoo is Odin compiled to wasm signing in through the host's port of it: // so this card shows one sign-in across both runtimes. import "ratcloud:rc" e01 :: proc() -> Exhibit { return { n = 1, wing = "Identity", kind = "human", title = "One sign-in, every app", promise = "Sign in once at account, and every app knows who you are without asking again.", block = "Sign-in is one call: rc.me() in a wasm app (auth_user() through account's shim in PHP). A signed-in browser is silently handed a token for that app; there is no sign-in page per app and no password anywhere.", src = {"e01_one_sign_in.odin", #load("e01_one_sign_in.odin", string)}, show = proc(me: ^rc.User) -> string { return cat(`
Who am I, here on the zoo:
`, person(me), `Now open a second app on its own address (zoo-broken, a PHP app; the zoo itself is compiled to wasm): it should show the same card, with no prompt.
`, seen_button(1, me, "Both cards showed me")) }, } }