Adding and Configuring New Users
A common task is to add a new user to our app.
Creating a Railbird App User
For TestFlight, make sure you get the user's email that is associated with their Apple account.
1) For now, we add our users to a spreadsheet here.
2) Go to the railbird directory
3) Run just prod railbird ipython
4) Run await make_user("some@email.com", display_name="Some Name")
Make sure to use the email associated with their Apple account if they want to use TestFlight
5) Click the reset password link and create a password. Add it to the spreadsheet.
6) Tell the user their username and password
7) Add user to TestFlight by going to appstoreconnect.apple.com
Uploading A Video to Your or Another User's Account Using The Railbird Client
Sometimes you may want to populate an account with videos. We can use the Railbird Client to do this.
Before you begin ensure you've succesfully completed Railbird Backend Setup.
In addition, you'll need to ensure that you yourself also have valid credentials for a Railbird user floating around in your backend environment and, if you intend to upload to someone else's account, that those are admin credentials.
For most cases, this credential is stored in ~/.config/railbird/config.toml
or somewhere close by, but you can also pass arbitrary configs to the Railbird CLI with -c <path/to/config>
.
[gcp.firebase]
email = "<Email address of your Railbird App Account>"
password = "<Password of your Railbird App Account>"
You can use yt-dlp or something similar to get a video (I recommend this YouTube channel...decent selection of videos with good angle for homography.)
Once you're properly set up and have a video to upload you can run railbird client upload <Path to the file you're uploading>
; this will add the video to the account of the credential in your config.
You can run railbird client upload <Path to the file you're uploading> --become-user <The user NAME you're targeting, not their user_id>
to upload to another user's account (again, as long as your account has Admin).