Does the URL you are initially redirecting to after logout require login?
If so, then when you attempt to go to that URL after having logged out, it
will immediately redirect again to the login page.
Anthony
On Wednesday, May 8, 2013 1:42:19 PM UTC-4, José Manuel López wrote:
>
> For a moment I can see the "logout" that you mention, but then I'm
> redirect to login?_next=/AppName/*default/index*, I'll change the next to
> my URL.
> Thank you for your time Anthony!, it's very appreciated.
>
> On Wednesday, May 8, 2013 6:53:51 PM UTC+2, Anthony wrote:
>>
>> OK, my mistake -- the _next variable points to auth.settings.logout_next
>> -- so just change that setting to whatever URL you want.
>>
>> Also, are you sure the Logout URL is pointing to /default/user/login and
>> not /default/user/logout?
>>
>> Anthony
>>
>> On Wednesday, May 8, 2013 12:40:57 PM UTC-4, José Manuel López wrote:
>>>
>>> Now I think I know what you are asking me:
>>>
>>>
>>> auth = Auth(db)
>>> # all we need is login
>>>
>>> auth.settings.actions_disabled=['change_password','request_reset_password','retrieve_username','profile']
>>> if request.controller != 'appadmin':
>>> auth.settings.actions_disabled +=['register']
>>>
>>> ## configure auth policy
>>> auth.settings.registration_requires_verification = False
>>> auth.settings.registration_requires_approval = False
>>> auth.settings.reset_password_requires_verification = False
>>> auth.settings.login_after_registration = True
>>>
>>> Jose M.
>>>
>>> On Wednesday, May 8, 2013 6:35:30 PM UTC+2, Anthony wrote:
>>>>
>>>> If you don't know where it is, then I suppose you probably haven't
>>>> changed it from the default scaffolding code -- but it would be in db.py
>>>> by
>>>> default. Can you create a basic application that replicates this problem,
>>>> pack it, and attach it here?
>>>>
>>>> Anthony
>>>>
>>>> On Wednesday, May 8, 2013 12:30:49 PM UTC-4, José Manuel López wrote:
>>>>>
>>>>> Sorry my ignorance but am newbie ... where can I find it?
>>>>>
>>>>> On Wednesday, May 8, 2013 6:27:15 PM UTC+2, Anthony wrote:
>>>>>>
>>>>>> What does your Auth setup code look like?
>>>>>>
>>>>>> On Wednesday, May 8, 2013 12:01:48 PM UTC-4, José Manuel López wrote:
>>>>>>>
>>>>>>> Hi Anthony,
>>>>>>> This is the code regarding the Navbar in myApp/views/layout.html :
>>>>>>>
>>>>>>> <!-- Navbar ================================================== -->
>>>>>>> <div class="navbar navbar-inverse navbar-fixed-top">
>>>>>>> <div class="flash">{{=response.flash or ''}}</div>
>>>>>>> <div class="navbar-inner">
>>>>>>> <div class="container">
>>>>>>> <!-- the next tag is necessary for bootstrap menus, do not
>>>>>>> remove -->
>>>>>>> <button type="button" class="btn btn-navbar"
>>>>>>> data-toggle="collapse" data-target=".nav-collapse">
>>>>>>> <span class="icon-bar"></span>
>>>>>>> <span class="icon-bar"></span>
>>>>>>> <span class="icon-bar"></span>
>>>>>>> </button>
>>>>>>> <a class="brand" href="http://www.web2py.com/
>>>>>>> "><b>web<span>2</span>py</b>™ </a>
>>>>>>> <ul id="navbar" class="nav pull-right">{{='auth' in
>>>>>>> globals() and auth.navbar(mode="dropdown") or ''}}</ul>
>>>>>>> <div class="nav-collapse">
>>>>>>> {{is_mobile=request.user_agent().is_mobile}}
>>>>>>> {{if response.menu:}}
>>>>>>> {{=MENU(response.menu, _class='mobile-menu nav' if
>>>>>>> is_mobile else
>>>>>>> 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
>>>>>>> {{pass}}
>>>>>>> </div><!--/.nav-collapse -->
>>>>>>> </div>
>>>>>>> </div>
>>>>>>> </div><!--/top navbar -->
>>>>>>>
>>>>>>> I have uploaded the file layout.html in case you need it (I think
>>>>>>> it's the default layout.html).
>>>>>>>
>>>>>>> Jose M
>>>>>>>
>>>>>>> On Wednesday, May 8, 2013 5:28:24 PM UTC+2, Anthony wrote:
>>>>>>>>
>>>>>>>> Can you show the code used to create the navbar? Is it just
>>>>>>>> auth.navbar(mode="dropdown")? The logout link on the navbar should
>>>>>>>> point to
>>>>>>>> /appname/default/user/logout?_next=[URL of the current page] -- it
>>>>>>>> should
>>>>>>>> not point to /default/user/login at all.
>>>>>>>>
>>>>>>>> Anthony
>>>>>>>>
>>>>>>>> On Wednesday, May 8, 2013 10:16:51 AM UTC-4, José Manuel López
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi Anthony,
>>>>>>>>> Thank you for your answer.
>>>>>>>>> I've attached a screenshot, I mean the button in the bar over the
>>>>>>>>> user interface:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> <https://lh5.googleusercontent.com/-jiao9-CTeYQ/UYpdspnYmHI/AAAAAAAAACo/cFu6REJXGxQ/s1600/Captura+de+pantalla+2013-05-08+a+la%28s%29+16.13.39.png>
>>>>>>>>>
>>>>>>>>> When click over "Fin de sesión" (close session) we are redirect to
>>>>>>>>> a login page with this URL: AppName/*default/user/login*
>>>>>>>>> ?_next=/AppName/*default/index* instead AppName/*
>>>>>>>>> default/user/login*?_next= /AppName/*normalController/index .*
>>>>>>>>> I hope this clarify the question.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wednesday, May 8, 2013 4:04:53 PM UTC+2, Anthony wrote:
>>>>>>>>>>
>>>>>>>>>> What do you mean by "close the session"?
>>>>>>>>>>
>>>>>>>>>> On Wednesday, May 8, 2013 9:58:13 AM UTC-4, José Manuel López
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi!,
>>>>>>>>>>> I'm a lost with this problem, maybe anyone can help me.
>>>>>>>>>>> Let's say I'm logged in this route: /AppName/*normalController*/
>>>>>>>>>>> *index*, and then close the session.
>>>>>>>>>>> Why when I close the session web2py redirects me to this URL?
>>>>>>>>>>> ->> AppName/*default/user/login*?_next=/AppName/*default/index* ,
>>>>>>>>>>> I was expecting something like: AppName/*default/user/login*
>>>>>>>>>>> ?_next= /AppName/*normalController/index *?. Why I think that?,
>>>>>>>>>>> because normalController is where the user comes... Is there any
>>>>>>>>>>> way to do
>>>>>>>>>>> it?, now when the user close the session and try to log in again,
>>>>>>>>>>> the
>>>>>>>>>>> destiny is /AppName/*default/index , *and this is a problem
>>>>>>>>>>> because they don't have privileges to log in and the feeling is
>>>>>>>>>>> that the
>>>>>>>>>>> application is not working ok.
>>>>>>>>>>>
>>>>>>>>>>> Thank you for your help!
>>>>>>>>>>>
>>>>>>>>>>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.