google-app-enginegoogle-appengine-node

Configure Basic HTTP Authentication with Google App Engine Node.js App


I'm running a GAE Standard Env. node/express app.

How can I configure Basic HTTP Authentication?

Is it possible to configure it with app.yaml?

I've read the docs, and did a lot of searching and so far it seems like I'll have to use my Express server to handle it. That seems weird because it requires that I have a server.

What if I wanted to serve a static HTML page? Then the express solution falls apart.

In nginx I can do this:

server {
    ...
    auth_basic           "Administrator’s Area";
    auth_basic_user_file conf/htpasswd;
}

Is there an equivalent with app.yaml in GAE?

Thanks for your help =)


Solution

  • I think its not possible to do this type of authentication, but you have other options - google sign in - oauth - firebase * users api is available but not for node standard app engine

    If you wanted to serve static html you might store it in Google Cloud Storage and Cloud storage has its own permissions options