mirror of
https://github.com/ASzc/change-string-case-action.git
synced 2024-11-24 06:13:52 +08:00
13 lines
274 B
JavaScript
13 lines
274 B
JavaScript
|
export async function auth(token) {
|
||
|
const tokenType = token.split(/\./).length === 3
|
||
|
? "app"
|
||
|
: /^v\d+\./.test(token)
|
||
|
? "installation"
|
||
|
: "oauth";
|
||
|
return {
|
||
|
type: "token",
|
||
|
token: token,
|
||
|
tokenType
|
||
|
};
|
||
|
}
|