I currently have a Mirror API only application that I am transitioning to a Hybrid (Mirror API + GDK App). The Mirror section of the application has the needed credentials and on new installs I am able to create the account (using the Account Manager system https://developers.google.com/glass/develop/gdk/authentication).
However, the Account insert call that happens from the Mirror API needs the userToken
. The userToken
is only provided on the initial authentication request from Google (and it specifically says not to save the userToken
).
Is there some other identifier I can use in order to create the accounts? I'd like to back fill the account credentials for my existing users to make the transition to a hybrid application as smooth as possible.
It sounds like you're asking for a way to create accounts on Glass automatically for existing users of your application, correct?
Unfortunately, that's not possible; as you found out, a call to mirror.accounts.insert
can only be made using the userToken
that you receive from the MyGlass redirect. In order to create an account on the device for the GDK component of the application, your users will need to disable and then re-enable your Glassware so that they are redirected through your new authorization flow.