authentication

Register

Finish an invited account: create the Firebase user, stamp its role claim, fill in users.auth_id, burn the invite, and log the caller in.

Deliberately role-agnostic. UserInvite doesn't distinguish a driver from an admin and link_firebase_to_user reads the role off the user row, so one endpoint serves both — a driver invited by an admin and an admin created by python -m app.create_admin follow the identical link and page.

Unauthenticated by necessity: the caller has no account yet. The invite id in the body is the credential — a single-use, 48-hour, unguessable UUID bound to one pre-created user row. It grants exactly the role that row already carries, so possession of a link can never escalate anyone.

post/api/auth/register

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

passwordstring required
user_invite_idstring uuid required

Response

Successful Response

access_tokenstring required
admin_idstring uuid nullable
driver_idstring uuid nullable
emailstring email required
first_namestring required
full_namestring required
idstring uuid required
last_namestring required
remember_meboolean required
rolestring required

Changes

No recorded changes to this operation across all 1 revision of this API.