So what I am saying is basically that we're doing it wrong. The authentication is intentionally tied to the currently running activity because it might need to show some UI and we don't want dialogs popping up randomly with no obvious link to their cause.
The idea is that the user is in an app, does something that needs auth, the app starts the auth activity, auth gets pushed on the stack, auth does its thing, then returns a result back to the app. startActivityForResult() is like a UI based subroutine call.
Android has deliberately tied these things together so that the user has some context for the prompt which is about to appear. It's similar for optional permissions too and many other APIs.
For Mojo too we will have to give some thought to how we empower and inform the user through interactions of this sort. Stuff needs some kind of context. The fact we aren't doing that in Mojo is a bug. :)
(FWIW, the bytesToIntent function is problematic. Intents are not intended to be serialized like that since they may contain binder objects.)
—
Reply to this email directly or view it on GitHub.