This repo relies on printing a url in the console and letting the user copy/paste Auth Code instead of automatically launching browser and running a local server like gcloud SDK does, but its README is worth a read as it also shows you current limitations when using Oauth/ openid connect flow to authenticate to Cloud Run,
If python is okay for you there is an official lib that supports launching browser and running a local server like what gcloud sdk does.