Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow AnonymousIdentity for get_identity() utils functions #187

Open
zannkukai opened this issue Jan 28, 2022 · 0 comments
Open

Allow AnonymousIdentity for get_identity() utils functions #187

zannkukai opened this issue Jan 28, 2022 · 0 comments

Comments

@zannkukai
Copy link

Is your feature request related to a problem? Please describe.

the

def get_identity(user):
method could be return a value even for AnonymousUser

Describe the solution you'd like

Check if user is an anonymous. If yes, return a flask_login.AnonymousIdentity instance.

    if not user.is_anonymous:
        return AnonymousIdentity()

I will be happy to contribute if you valid this feature.

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

No branches or pull requests

1 participant