AppEngine Users API not working for my domain

7 views
Skip to first unread message

cherian sabby

unread,
Jul 26, 2008, 2:53:22 AM7/26/08
to Google App Engine
hi guys,
I have created 2 apps.

This is the code that I use in both the applications to redirect a
user to the login page.
def enterEmployeeProfile(request):
user = users.get_current_user()
if user:
form = EmployeeProfileForm()
return render_to_response('EmployeeProfileTemplate.html',
{'form': form} )
else:
greeting=users.create_login_url("/")
return render_to_response('loginToGoogle.html',{'greeting':
greeting})

This is the code in my template 'loginToGoogle.html'
<a href="{{greeting}}">Sign in or register</a>

As one of the applications is associated with my domain. When one
clicks on "Sign in or register", I expect the login page of my domain
to be displayed,l but I get a server error "Invalid page Request"
This is the url that is generated.
https://www.google.com/a/xyz.com/ServiceLogin?service=ah&passive=true&continue=http://teamxyz.appspot.com/_ah/login%3Fcontinue%3Dhttp://teamxyz.appspot.com/&ltmpl=ga&ahname=xyz+management&sig=094ba83e694f48202c3667af4da37cfb


The other application is not restricted to any domain so it displays
me the google login page.
This is the URL that gets generated
https://www.google.com/accounts/ServiceLogin?service=ah&continue=http://testsourcerors.appspot.com/_ah/login%3Fcontinue%3Dhttp://testsourcerors.appspot.com/&ltmpl=gm&ahname=Sourcerors&sig=9e10f8a0a8da778fc6f6c6b244efc7b8.

I am a little confused as to why I get a server error for my
domain.when I try to display my domain login page.

regards,
Cherian



Marzia Niccolai

unread,
Jul 28, 2008, 5:36:11 PM7/28/08
to google-a...@googlegroups.com
Hi Cherian,
 Here is what I expect is the issue:  You have restricted your application's authentication to a certain domain, but you are trying to have a person log in to that domain's account on page served from an appspot.com address.

 Currently, if you have restricted authentication of your application to a given domain, log in will only work for pages being served on that domain.

 For example, if I restrict log in to foo.com, myu...@foo.com will not be able to log in if the application is being served from bar.appspot.com or bar.com. they will only be able to log in when it is being served on foo.com.

-Marzia
Reply all
Reply to author
Forward
0 new messages