v3 new release (#87)

add token
This commit is contained in:
github-actions[bot]
2022-07-25 13:23:27 -04:00
committed by GitHub
parent e4f3964f67
commit 84b304dfb7
31 changed files with 1057 additions and 2 deletions

View File

@ -0,0 +1,11 @@
/**
* Prefix token for usage in the Authorization header
*
* @param token OAuth token or JSON Web Token
*/
export function withAuthorizationPrefix(token) {
if (token.split(/\./).length === 3) {
return `bearer ${token}`;
}
return `token ${token}`;
}