decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Fix login with Gitlab (change API `Authorization` header "token" → "Bearer")

Open floscher opened this issue 1 year ago • 0 comments

The authorization type "Bearer" is more widely recognized than "token". E.g. Gitlab requires that you use "Bearer".

Github mentions that it accepts both "token" and "Bearer": https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#about-authentication

Gitlab seems to require the use of "Bearer", which was apparently the cause of #7172: https://github.com/decaporg/decap-cms/issues/7172#issuecomment-2184138768 (thanks to @b-xb for digging into this)

See also: https://github.com/decaporg/decap-cms/pull/5844#discussion_r1658974332

Fixes #7172.

Summary

Gitlab login is broken in current versions: #7172

Test plan

Checklist

A picture of a cute animal (not mandatory but encouraged)

floscher avatar Jun 29 '24 11:06 floscher