Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Forge External Auth Provider (Keycloak): hasCredentials() returns false after successful authenticat

Forge External Auth Provider (Keycloak): hasCredentials() returns false after successful authenticat

Akshat Patel November 14, 2025

Issue Summary:
We are experiencing an issue with Forge's External Auth Provider integration using Keycloak. After a successful authentication, `keycloak.hasCredentials()` incorrectly returns `false` on the first attempt, but returns `true` on subsequent requests.

Environment:
- Forge App using External Auth Provider
- Auth Provider: Keycloak
- Runtime: Node.js 20.x
- Forge API: @Forge/api

Code Implementation:
const keycloak = await api.asUser().withProvider("keycloak", "custom-backend");
if (!(await keycloak.hasCredentials(["email"]))) {
await keycloak.requestCredentials();
}

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events