DEV Community

chovy
chovy

Posted on Originally published at dev.profullstack.com

BackToSchool has its own account now, and nixamp is the optional backend

backtoschool.help runs on the nixamp codebase, and until today its sign-in dialog said so: "Your BackToSchool identity is your NixAmp account." That line did two things I did not want. It made a password manager file the nixamp password under the school's address, and it made nixamp something every teacher had to have before they could teach a class.

Both are gone. A BackToSchool account is a BackToSchool account. nixamp is the broadcast backend you can plug in if you run one, and plugging it in is a choice.

Your host card, said once

Every class page shows who is teaching: a name, a homepage, a photo. Those used to be three fields on the class form, blank every time, so the same person typed the same three answers for every class.

Now they live on the account. Open settings from the header, type your name once, upload a photo (PNG, JPEG, WebP or GIF, up to 1 MB, kept as bytes on the server rather than hotlinked from somewhere that may vanish), add a line about what you teach. Every class you make from then on carries it. The class form shows the card and a link to settings instead of asking again.

If you keep an OpenProfile.md, paste its address and press "Fill from OpenProfile". The name, the Web link, the Avatar and the headline come across in one move, and the address is remembered so the phone line reads your voice from the same file.

The card is shared with nixamp.com. It is one table, read by both sites.

Connect nixamp, if you want to

In settings there is a "Connect nixamp" button. It sends you to nixamp.com's consent page, the same OAuth 2.1 flow bittorrented.com uses, with PKCE and a scope called streams that reads the servers you run and what is live on them. Say yes and you come back connected.

What that buys you is a pick list. When you go live, the class form shows your nixamp servers and their channels, and picking one fills in the broadcast link. No more copying a share link out of a terminal. Disconnect from either side and the grant is withdrawn on both.

If you never press the button, nothing changes. Paste a nixamp share link, a PairUX link or a direct media URL as before.

One click from nixamp.com

On nixamp.com, next to the copy-link button on a live room, there is now "Teach this on backtoschool.help". It makes a class from the room you are watching, puts your host card on it, starts it, and opens it in a new tab. One click, and the room is a classroom.

What is underneath

nixamp.com was already an OAuth 2.1 authorization server. The school is now a registered public client of it, in the same process, talking to itself over HTTP the way any other client would. The tokens sit against the school account and refresh themselves; a refresh nixamp.com refuses is treated as a withdrawn grant.

The whole thing is tested against a real Postgres: the card round trip with a photo and an import, a class inheriting it, and the connect, consent, callback, streams and disconnect legs run over one server acting as both sides.

Live now on backtoschool.help and nixamp.com.

Top comments (0)