UserClouds logo
Quickstart guides

Sample app

We’ve set up a very simple sample app, so that you can demo UserClouds Authentication in less than 5 minutes. We've simplified the code to the bare minimum, so please do apply actual software engineering practices to any code you derive from this!

Clone the sample code / repo

  • Python: git clone ssh://git@github.com/userclouds/gettingstarted-python.git
  • Go: git clone ssh://git@github.com/userclouds/gettingstarted-golang.git

Run the sample app locally

Make sure you have Git and Python / Go installed, then run the clone command in your Terminal. This doc assumes you are using python3 and Go 1.18+.

If you’re using Python, we'd recommend using a virtualenv to isolate dependencies (as with any Python project). We haven't included the virtualenv to avoid system-specific path issues.

python3 -m venv .
source bin/activate
pip3 install -r requirements.txt

Try it out!

Point a browser at http://localhost:8080 and click “login”. You will be redirected to a UserClouds branded login screen. Of course, this page can be customized to your branding later.

UserClouds login screen

From here, you can create your own account, by clicking "Create an Account" below the login button. Once you’ve created your account, you’ll be automatically logged in and redirected back to your sample app. The app will display the parameters of the JWT validating your log-in. Nice work!