mirror of https://github.com/openclaw/openclaw.git
fix(auth): use anthropic oauth email profile
Use Anthropic OAuth profile email as the profile identifier when available. This fixes cases where Anthropic returns an email-based profile id rather than an explicit id field.
This commit is contained in:
parent
8b1263ce11
commit
ff79db0a99
|
|
@ -299,8 +299,9 @@ async function promptAuthConfig(
|
|||
spin.stop("OAuth complete");
|
||||
if (oauthCreds) {
|
||||
await writeOAuthCredentials("anthropic", oauthCreds);
|
||||
const profileId = `anthropic:${oauthCreds.email ?? "default"}`;
|
||||
next = applyAuthProfileConfig(next, {
|
||||
profileId: "anthropic:default",
|
||||
profileId,
|
||||
provider: "anthropic",
|
||||
mode: "oauth",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -295,8 +295,9 @@ export async function runOnboardingWizard(
|
|||
spin.stop("OAuth complete");
|
||||
if (oauthCreds) {
|
||||
await writeOAuthCredentials("anthropic", oauthCreds);
|
||||
const profileId = `anthropic:${oauthCreds.email ?? "default"}`;
|
||||
nextConfig = applyAuthProfileConfig(nextConfig, {
|
||||
profileId: "anthropic:default",
|
||||
profileId,
|
||||
provider: "anthropic",
|
||||
mode: "oauth",
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue