0

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;
Cœur
  • 37,241
  • 25
  • 195
  • 267
  • just a note, for yaml files, as soon as you hit one url pattern, the other patterns will never hit. So you will never be able to hit "_ah/mail" because /.* will be hit first. That's unrelated to your question, but thought it might be important – Patrice Jul 31 '14 at 21:02
  • I never knew that, thanks! Didn't mean to leave that in there, I approached mail handling a different way so from "- url: /_ah/mail/.+" down has been removed. – Dowling1dow Jul 31 '14 at 21:20

1 Answers1

1

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)

Patrice
  • 4,641
  • 9
  • 33
  • 43
  • Yeh I have tried that already, but it didn't seem to make a difference, Ill edit the post to include the .yaml file – Dowling1dow Jul 31 '14 at 20:54
  • could it have something to do with that configuration you might have setup then? https://developers.google.com/appengine/articles/auth – Patrice Jul 31 '14 at 20:58
  • @Dowling1dow Or maybe there is something in the code that is doing that..! Is it your code? – Lipis Jul 31 '14 at 21:14
  • 2
    @Lipis OMG, its always the little things.. I looked over my code again, at the start of my php I was using the google Users API when I didn't really need to, I removed that along with an if statement and happy days !! no login. – Dowling1dow Jul 31 '14 at 21:57
  • NOTE: In *Java* (at the time of writing) trying to use `login: optional` does not even compile. as you can see here: https://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/apphosting/utils/config/AppYaml.java?spec=svn389&r=389#51 optional is not even in the enum. – epeleg Jan 07 '15 at 12:35