INNER CODE UNIT · JavaScript
isClaudeLoggedInText
chadbyte/clay · lib/yoke/index.js:152
function isClaudeLoggedInText(out) {
if (!out) return false;
var text = String(out).toLowerCase();
if (text.indexOf("not logged in") !== -1) return false;
if (text.indexOf("login method:") !== -1) return true;
if (text.indexOf("logged in") !== -1) return true;
return false;
}
function hasThirdPartyProviderAuth() {
// Claude Code supports third-party providers via env vars. When these are set,
// `claude auth status` reports "not logged in" because there is no OAuth session,
// but Claude Code itself authenticates directly through the provider.
var env = process.env;
if (env.CLAUDE_CODE_USE_BEDROCK === "1"
&& (env.AWS_BEARER_TOKEN_BEDROCK
|| env.AWS_ACCESS_KEY_ID
|| env.AWS_PROFILE