From db7831d52fcbb47b22cca8a5eefffe6ba0e65379 Mon Sep 17 00:00:00 2001 From: Brion Date: Thu, 29 Jan 2026 12:03:57 +0530 Subject: [PATCH 1/3] Update I18nMetadata to allow string type for direction property --- packages/i18n/src/models/i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/i18n/src/models/i18n.ts b/packages/i18n/src/models/i18n.ts index fffddbaa..f5b4be11 100644 --- a/packages/i18n/src/models/i18n.ts +++ b/packages/i18n/src/models/i18n.ts @@ -176,7 +176,7 @@ export interface I18nMetadata { countryCode: string; languageCode: string; displayName: string; - direction: I18nTextDirection; + direction: I18nTextDirection | string; } export interface I18nBundle { From d12bf46b099f1feb8730899ed419f79d4c400d89 Mon Sep 17 00:00:00 2001 From: Brion Date: Thu, 29 Jan 2026 13:06:13 +0530 Subject: [PATCH 2/3] Add support for AsgardeoV2 platform in AuthenticationHelper to comply with RFC 8414 --- .../__legacy__/helpers/authentication-helper.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/javascript/src/__legacy__/helpers/authentication-helper.ts b/packages/javascript/src/__legacy__/helpers/authentication-helper.ts index f6c845ac..709380c2 100644 --- a/packages/javascript/src/__legacy__/helpers/authentication-helper.ts +++ b/packages/javascript/src/__legacy__/helpers/authentication-helper.ts @@ -20,8 +20,10 @@ import OIDCDiscoveryConstants from '../../constants/OIDCDiscoveryConstants'; import TokenExchangeConstants from '../../constants/TokenExchangeConstants'; import {AsgardeoAuthException} from '../../errors/exception'; import {IsomorphicCrypto} from '../../IsomorphicCrypto'; +import {Config} from '../../models/config'; import {JWKInterface} from '../../models/crypto'; import {OIDCDiscoveryEndpointsApiResponse, OIDCDiscoveryApiResponse} from '../../models/oidc-discovery'; +import {Platform} from '../../models/platforms'; import {SessionData} from '../../models/session'; import {IdToken, TokenResponse, AccessTokenApiResponse} from '../../models/token'; import {User} from '../../models/user'; @@ -145,6 +147,19 @@ export class AuthenticationHelper { .USERINFO]: `${baseUrl}${OIDCDiscoveryConstants.Endpoints.USERINFO}`, }; + // For AsgardeoV2 (Thunder), the issuer must be the base URL (e.g., https://localhost:8090) + // to comply with RFC 8414 (Section 2 & 3) and OpenID Connect Discovery specs. + // The issuer should be a URL using "https" scheme with no query or fragment components. + // The well-known metadata endpoint is derived by inserting "/.well-known/oauth-authorization-server" + // between the host and path components of the issuer identifier. + // Reference: https://datatracker.ietf.org/doc/html/rfc8414#section-2 + // Trackers: + // - https://github.com/asgardeo/thunder/issues/815 + // - https://github.com/asgardeo/javascript/issues/322 + if ((configData as Config).platform === Platform.AsgardeoV2) { + defaultEndpoints[OIDCDiscoveryConstants.Storage.StorageKeys.Endpoints.ISSUER] = `${baseUrl}`; + } + return {...defaultEndpoints, ...oidcProviderMetaData}; } From ff86e3b01a1f01decb781ce3d833d50773574259 Mon Sep 17 00:00:00 2001 From: Brion Date: Thu, 29 Jan 2026 13:07:21 +0530 Subject: [PATCH 3/3] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/cool-crews-press.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/cool-crews-press.md diff --git a/.changeset/cool-crews-press.md b/.changeset/cool-crews-press.md new file mode 100644 index 00000000..996e816c --- /dev/null +++ b/.changeset/cool-crews-press.md @@ -0,0 +1,6 @@ +--- +'@asgardeo/javascript': patch +'@asgardeo/i18n': patch +--- + +Add support for AsgardeoV2 platform in AuthenticationHelper to comply with RFC 8414