3
votes

We have an existing Android and iOS application that consumes REST API from our servers. The API provides a token to the authenticated users after they log in using their credentials (username, password combo.) from the mobile applications.

Now, we're planning to create a Google Glass application for the same. In this case, we'd like to use the existing REST API along with Glass also. The Glass app will be built natively using the GDK.

My concern is, how would the users be able to input credentials? Because, users may have signed up for the service using non-google accounts?

Many thanks in advance.

3
I'm a little confused what you're trying to do here. Are you looking to use the Mirror API (which is what you've tagged, what is implied by talking about the OAuth service, and what you imply with a REST API) or the GDK (which you say you'll be using and uses a very different approach). Please update the question to clarify.Prisoner
@Prisoner, I've updated the question.Ragunath Jawahar
While the Google Glass folk have noted that they will create a method for authentication (probably using an AuthenticationManager mechanism), this is not yet available. In the meantime, some folk are temporarily using a "read" QR code mechanism generated server side.ErstwhileIII
@ErstwhileIII, definitely viable. Thanks.Ragunath Jawahar

3 Answers

3
votes

At the moment, there is no supported way for apps made with GDK Early Access to authenticate the user or provide a way to connect the Glass account to your auth system. The Glass team has indicated such methods are coming, however - the Strava Cycling app, for example, does this, and it is expected that a similar feature will become widely available as the GDK matures.

Strava Cycling appears to get its credentials at the time you setup the app through MyGlass. When you turn it on it redirects you to a website to log into Strava's service before completing the install.

2
votes

I just gave a talk on this exact topic at Wearables DevCon. The solution I proposed is purely done through GDK. All the user has to do is sign into their Google Account on a phone/tablet/computer and enter a code that is shown on Glass.

Check out the slides here: https://docs.google.com/presentation/d/1NepYwlKdEvLV0QH9ix2I8l-JY1kHjBR9AXKBNpgTI6g/edit

And the code here: https://github.com/victorkp/GlassWebNotes

1
votes

The latest Glass release (XE16) publishes the remote authentication API for apps distributed through MyGlass:

https://developers.google.com/glass/develop/gdk/authentication