Dowling1dow
Dowling1dow

Reputation: 57

How do I allow users to view my Google App Engine website without having to log into a Google Account?

I've created a simple website using Google app engine. Any time a person views the site they are presented with a google account login screen, unless they are already signed into a google account.

My question is, would there be any way of bypassing that screen and allowing the user to go straight to my website regardless of whether they are signed into google or not.

I've tried researching this but haven't found a solution yet, if there is one.

Perhaps something to configure within app.yaml ? I'm not really sure, any help would be greatly appreciated.

My app.yaml

application: myappid
version: 1
runtime: php
api_version: 1
threadsafe: yes

default_expiration: "7d"

handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css|swf|xml))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css|swf|xml))
  login: optional

- url: /.*
  script: main.php
  login: optional

[SOLVED] The problem was solved by removing a few lines of code where I was using the google users API, feel stupid now for overlooking this completely.

Removed these lines at the top of my PHP

require_once 'google/appengine/api/users/UserService.php';

use google\appengine\api\users\User;
use google\appengine\api\users\UserService;

Upvotes: 0

Views: 409

Answers (1)

Patrice
Patrice

Reputation: 4692

make sure you have

"login: optional" in your yaml.

It SHOULD be default, but maybe you copied the yaml from somewhere and there is a "login : required" or "login : admin" somewhere.

(https://developers.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Requiring_login_or_administrator_status)

Upvotes: 1

Related Questions