Python API/Rest API and authentication with SSO enabled

Thanks for the extra info Patrick. However, we are fine creating a QApplication before we authenticate and so don’t need console login. But going this route:

import sgtk
from tank_vendor.shotgun_authentication import ShotgunAuthenticator
cdm = sgtk.util.CoreDefaultsManager()
authenticator = ShotgunAuthenticator(cdm)
user = authenticator.get_user()

What we get is the old style login window, which expects the old login name and password (not the Autodesk registered email). These logins actually still work but presumably this is the wrong approach?

What I would expect to be correct is for the new style (web-linked) dialog to appear, which is why I’m looking at the method in this thread. Like I say though, we will need the login to persist beyond the session - just as when you log in to SGD, it means you’re logged in permanently. i.e. if I then run the code above from a completely new process, the user will return correctly and can be used.

To be honest it feels like tank_vendor.shotgun_authentication.ShotgunAuthenticator has not been brought up to date with the current login system. Why does it launch the old style login dialog if you’re not logged in?

Anyway, I’ll educate myself on persistent cookies etc. and see if I can get where we need with that. Thanks.