app.models.user.User.get_auth_token

User.get_auth_token() Union[str, bytes]

Constructs the user’s authentication token.

Raises

ValueError – If fs_token_uniquifier is part of model but not set.

Optionally use a separate uniquifier so that changing password doesn’t invalidate auth tokens.

This data MUST be securely signed using the remember_token_serializer

Changed in version 4.0.0: If user model has fs_token_uniquifier - use that (raise ValueError if not set). Otherwise fallback to using fs_uniqifier.