I can confirm that missing SCRIPT_NAME in
ApplicationAuthMetadata.authenticate was the source of the issue, I added
tests for this to avoid future regressions (
https://github.com/TurboGears/tg2devtools/commit/843e927008c80f7f2fc41dbfd18e7a7dc285be6c
)

On Tue, Mar 28, 2017 at 10:33 AM, Alessandro Molina <
[email protected]> wrote:

> As the login process happens before request is involved it doesn't rely on
> tg.url so you probably need to manually add the prefix into config.app_cfg.
> ApplicationAuthMetadata.authenticate there you should see a call for
> HTTPFound which sends to "/login". You need to environ['SCRIPT_NAME']
> before the "/login"
>
> If that doesn't fix all your problems let me know, I'll try to check and
> came up with all the required changes.
>
> This is btw a bug In the quickstart template, I'll address it into a
> 2.3.11 release.
>
> On Mon, Mar 27, 2017 at 2:10 PM, <[email protected]> wrote:
>
>> Hi,
>>
>> I'm having a problem with a site deployed with a prefix. Authorization
>> for the site is enabled but I cannot pass login phase. After I enter
>> username and password i get redirected to:
>>
>> https://website/prefix/login_handler?__logins=0&came_from=%2Fprefix%2F
>>
>> but I get error 404
>>
>> As a consequence I cannot access any pages that require authorization.
>> If I serve the same site with gearbox (without a prefix) I can pass login
>> phase and afterwords access authenticated pages through prefix (for
>> instance https://website/prefix/admin/).
>>
>> The same goes for logout (error 404 after redirected to
>> https://website/prefix/logout_handler).
>>
>> Tried to check login handler and logout handler but could not find them
>> in controllers.
>>
>> The same error happens in TG 2.3.10.
>>
>> What can be done about it?
>>
>> With Best Regards
>>
>> Ervin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TurboGears" 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/turbogears.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to