Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cool-ligers-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@forgerock/javascript-sdk': patch
---

Fix condition for determining session endpoint request for terminating session in AIC/AM
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('should login and logout with pingone', async ({ page }) => {
await btn.click({ delay: 1000 });
await page.waitForURL(/ping/);
await page.getByPlaceholder('Username').fill('reactdavinci@user.com');
await page.getByRole('textbox', { name: 'Password' }).fill('abc123!ABC');
await page.getByRole('textbox', { name: 'Password' }).fill('bae0fzc-mzg3krg5FQB');
await page.getByRole('button', { name: 'Sign On' }).click();

await expect(page.getByText('preferred_username')).toContainText('reactdavinci@user.com');
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci=github.yml"],
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"],
"production": [
"default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
Expand Down
5 changes: 2 additions & 3 deletions packages/javascript-sdk/src/fr-user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import TokenManager from '../token-manager';
import type { LogoutOptions } from '../oauth2-client/interfaces';
import Config from '../config';
import TokenStorage from '../token-storage';
import { getEndpointPath } from '../util/url';

/**
* High-level API for logging a user in/out and getting profile information.
Expand Down Expand Up @@ -49,9 +48,9 @@ abstract class FRUser {
// Shallow copy options to delete redirect prop
const configOptions = { ...options };
delete configOptions.redirect;
const { realmPath, serverConfig } = Config.get(configOptions);
const { serverConfig } = Config.get(configOptions);

if (getEndpointPath('sessions', realmPath, serverConfig.paths)) {
if (!serverConfig.paths || (serverConfig.paths && 'sessions' in serverConfig.paths)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

// Just log any exceptions that are thrown, but don't abandon the flow
try {
// Both invalidates the session on the server AND removes browser cookie
Expand Down
Loading