Trellis supports more Composer auth types than the docs claim

I noticed something while setting up a new Trellis project yesterday: the docs at Composer HTTP Basic Authentication | Trellis Docs | Roots only explain adding http-basic as a supported Composer auth.json type. Worse, they say “only HTTP basic authentication is supported”.

But this is not so! @TangRufus added support for the bearer, gitlab-oauth, gitlab-token, github-oauth, and bitbucket-oauth authentication types in https://github.com/roots/trellis/pull/1413 a couple years ago.

And I know it works 'cause I use it :grin:. It’s wonderful for adding private git repos as dependencies in Bedrock.

I’m guessing a documentation update fell through the cracks. I figured I should post about it here so more people know about the feature, and hopefully spur a correction in the docs.

Thanks, reported here Trellis Composer auth docs are missing latest updates · Issue #551 · roots/docs · GitHub

Any interest in doing a docs PR?

Sure, I can put one together when I get a chance. Should the name of the doc stay the same, or move to, say, composer-authentication.md?

1 Like

Good call on the naming. If you want to contribute to the existing doc, I can rename it before deploying (requires me changing the config on the site)

1 Like