Skip to content
Draft
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/soft-moose-read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@forgerock/device-client': patch
---

Makes `realm` optional in device profile query
3 changes: 2 additions & 1 deletion e2e/davinci-app/components/fido.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
FidoRegistrationCollector,
FidoAuthenticationCollector,
Updater,
FidoClient,
} from '@forgerock/davinci-client/types';

export default function fidoComponent(
Expand All @@ -17,7 +18,7 @@ export default function fidoComponent(
updater: Updater<FidoRegistrationCollector | FidoAuthenticationCollector>,
submitForm: () => Promise<void>,
) {
const fidoApi = fido();
const fidoApi: FidoClient = fido();
if (collector.type === 'FidoRegistrationCollector') {
const button = document.createElement('button');
button.type = 'button';
Expand Down
8 changes: 3 additions & 5 deletions e2e/device-client-app/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { deviceClient } from '@forgerock/device-client';
import type { ConfigOptions, DeviceClient } from '@forgerock/device-client/types';
import {
CallbackType,
Config,
Expand Down Expand Up @@ -76,11 +77,8 @@ export const LoginAndGetClient = Effect.gen(function* () {
const un = url.searchParams.get('un') || 'devicetestuser';
const pw = url.searchParams.get('pw') || 'password';

const config = {
const config: ConfigOptions = {
realmPath,
tree,
clientId: 'WebOAuthClient',
scope: 'profile email me.read openid',
serverConfig: {
baseUrl: amUrl,
timeout: 3000,
Expand Down Expand Up @@ -120,7 +118,7 @@ export const LoginAndGetClient = Effect.gen(function* () {
Effect.flatMap(() => getTokens),
);

const client = deviceClient(config);
const client: DeviceClient = deviceClient(config);
return client;
});

Expand Down
3 changes: 2 additions & 1 deletion e2e/oidc-app/src/utils/oidc-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {
GenericError,
GetAuthorizationUrlOptions,
OauthTokens,
OidcClient,
TokenExchangeErrorResponse,
} from '@forgerock/oidc-client/types';

Expand Down Expand Up @@ -49,7 +50,7 @@ export async function oidcApp({ config, urlParams }) {
const state = urlParams.get('state');
const piflow = urlParams.get('piflow');

const oidcClient = await oidc({ config });
const oidcClient: OidcClient = await oidc({ config });
if ('error' in oidcClient) {
displayError(oidcClient);
}
Expand Down
3 changes: 2 additions & 1 deletion e2e/protect-app/src/protect-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import './style.css';
import { protect } from '@forgerock/protect';
import type { Protect } from '@forgerock/protect/types';
import {
CallbackType,
Config,
Expand All @@ -23,7 +24,7 @@ import {
UserManager,
} from '@forgerock/javascript-sdk';

const protectAPI = protect({ envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447' });
const protectAPI: Protect = protect({ envId: '02fb4743-189a-4bc7-9d6c-a919edfe6447' });
const FATAL = 'Fatal';

// Check URL for query parameters
Expand Down
3 changes: 2 additions & 1 deletion packages/device-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ npm install @forgerock/device-client --save
To configure the `deviceClient`, you need to provide a `ConfigOptions` object that includes the base URL for the server and the realm path.

```typescript
import { deviceClient, type ConfigOptions } from '@forgerock/device-client';
import { deviceClient } from '@forgerock/device-client';
import type { ConfigOptions } from '@forgerock/device-client/types';

const config: ConfigOptions = {
serverConfig: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* of the MIT license. See the LICENSE file for details.
*/
export interface GetProfileDevices {
realm: string;
realm?: string;
userId: string;
}

Expand Down
3 changes: 1 addition & 2 deletions packages/journey-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ yarn add @forgerock/journey-client
## Quick Start

```typescript
import { journey } from '@forgerock/journey-client';
import { callbackType } from '@forgerock/sdk-types';
import { journey, callbackType } from '@forgerock/journey-client';

async function authenticateUser() {
// Initialize the client with wellknown discovery
Expand Down
14 changes: 14 additions & 0 deletions packages/oidc-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ A generic OpenID Connect (OIDC) client library for JavaScript and TypeScript, de

The oidc module follows the [OIDC](https://openid.net/specs/openid-connect-core-1_0.html) specification and provides a simple and easy-to-use API to interact with the OIDC server. It allows you to authenticate, retrieve the access token, revoke the token, and sign out from the OIDC server.

## Installation

```bash
pnpm add @forgerock/oidc-client
# or
npm install @forgerock/oidc-client
# or
yarn add @forgerock/oidc-client
```

## Quickstart

```js
import { oidc } from '@forgerock/oidc-client';

// Initialize OIDC Client
const oidcClient = await oidc({
/* config */
Expand Down
Loading