Use of declared argument in get_post_login_redirect function #805
Unanswered
TheDavidFactor
asked this question in
Q&A
Replies: 1 comment
-
That argument - and not being used - has been there forever... Yours is the first useful use case I have heard about - let me think about that a bit. I suppose a not too bad hack would be to change 'next' on the request and let the normal logic take its course. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I see
declared
is passed throughget_post_login_redirect
toget_post_action_redirect
where it is inserted into the first position of theurls
list if it's provided. However I don't see any call toget_post_login_redirect
that setsdeclared
so it appears to be unused.I need to be able to override the login redirect from a custom login form
validate
method on occasion. I'm doing this by setting a value forsecurity_post_login_view
in the session since that is checked first infind_redirect
but it would be nice to be able to preempt the arg and form next values asdeclared
does.Is there somewhere I could hook into
declared
that I'm not seeing? Or would I need to subclass or monkey patch part of Flask-Security-Too to get access to settingdeclared
?Beta Was this translation helpful? Give feedback.
All reactions