Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

add SECURITY_POST_LOGIN_ALLOW_REDIRECT_DOMAIN option #399

Closed
wants to merge 2 commits into from

Conversation

wong2
Copy link

@wong2 wong2 commented Jun 26, 2015

Consider this: after login from www.domain.com, the user should be redirected to en.domain.com, which is not allowed by Flask-Security currently.

so a new option SECURITY_POST_LOGIN_ALLOW_REDIRECT_DOMAIN is introduced, in the above situation, one could set SECURITY_POST_LOGIN_ALLOW_REDIRECT_DOMAIN = '*.domain.com' to allow such redirection.

@wong2
Copy link
Author

wong2 commented Oct 31, 2017

ping @mattupstate

@@ -314,6 +314,11 @@ Miscellaneous
``SECURITY_DATETIME_FACTORY`` Specifies the default datetime
factory. Defaults to
``datetime.datetime.utcnow``.
``POST_LOGIN_ALLOW_REDIRECT_DOMAIN`` Specifies domain allowed to be
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use SECURITY_ prefix.

``POST_LOGIN_ALLOW_REDIRECT_DOMAIN`` Specifies domain allowed to be
redirected to after login. You can
use wildcard patterns like
``*.doumail.com``. Defaults to the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*.doumail.com -> *.example.com to be clear that it's an example.

Copy link
Collaborator

@jirikuncar jirikuncar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wong2 can you please include tests?

@wong2 wong2 closed this Nov 1, 2017
@wong2
Copy link
Author

wong2 commented Nov 1, 2017

sorry it has been too long, can't remember the details here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants