fly auth with multiple orgs forcing SSO for wrong account

When I run
fly auth whoami I correctly see my personal email address as I’m working on a personal project.

But whenever I run fly commands that need auth, it opens up a fly io screen saying

Incoming authentication request

A Fly.io client is trying to fetch authentication tokens for your account. If you initiated this action, please continue.

When I click “continue” it takes me to a google SSO screen locking in the domain of a different org that my same account belongs to.

This is causing me a lot of headaches and I’m curious if anyone has any ideas..

Thanks!

Hm… Something broadly similar happened here once, and it turned out that I had one of the FLY_* environment variables set locally (on the desktop development machine).

$ export FLY_APP=env-override
$ fly m list
No machines are available on this app env-override.
$ unset FLY_APP
$ fly m list  # takes the app name from `./fly.toml` now.
1 machines have been retrieved from app local-dir-app.
[...]

Another possibility is that it’s finding a fly.json or fly.yaml, which are allowed substitutes for fly.toml these days.

https://community.fly.io/t/fly-config-in-your-choice-of-formats-toml-yaml-or-json/20017

Hope this helps a little!