If the library fits your need, use it.
If the library almost fits your need, consider cloning it and make the minor changes to it [and providing a pull request, if your additions are worth].
If desired feature is part of you business core [i.e. you want to make money out of it], consider rewriting it from scratch.
But for such a feature, I would go for an existing tool - Symfony does the same with FOSUserBundle for example.