Hi
I've recently gone from writing seperate Android and iOS apps to using 
Ionic2, and I want to continue to use Endpoints as my backend. The problem 
is how to do the authentication. The authentication code for Android client 
side was done like this (know this isn't the best way, some encryption and 
safety is on the TODO-list):
backend.Builder pb = new 
backend.Builder(AndroidHttp.newCompatibleTransport(), new 
AndroidJsonFactory(), new HttpRequestInitializer() {
                            @Override
                            public void initialize(HttpRequest request) 
throws IOException {
                                HttpHeaders headers = request.getHeaders();
                                headers.set("authinfo", 
usernameTxt+"&"+passwdTxt);
                                request.setHeaders(headers);
                            }
                        });

I've done custom authentication on the server-side like described on a 
StackOverflow answer <https://stackoverflow.com/a/25390994>.

In the javascript gapi I only see options for using Google accounts, but we 
want to use seperate username/password for our system. It doesn't seem to 
be any way to send custom headers and using custom authentication in the 
javascript api. Custom authentication is not documented which make 
searching for answers tedious. I've heard rumors that Snapchat uses google 
app engine, how do they get the custom username/password system? Is 
Firebase Authentication maybe the way to go? How would that be done in in 
the javascript code client side? 

Any links, answers or other useful information is welcome :) 


 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/07cc7a09-3c15-4b4b-a4e2-d17a5c040bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Marie Ekeberg

Reply via email to