# @schibsted/account-sdk-browser

> Schibsted account SDK for browsers

Latest version **6.0.0** (published 2026-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @schibsted/account-sdk-browser
pnpm add @schibsted/account-sdk-browser
yarn add @schibsted/account-sdk-browser
bun add @schibsted/account-sdk-browser
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2026-10-20 |
| First published | 2018-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 414.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | schibstedbot, joawan, rodbiffi, gustavkj, pakerstrand, filipgolonka, spp-owner, johand199, katarzynapalka, sch_ingeborg, begum.ozcan-caliskaner-sch, mike-dvtka, nicolai-schibsted, media-appsec |

## Links

- npm: https://www.npmjs.com/package/@schibsted/account-sdk-browser
- Homepage: https://schibsted.github.io/account-sdk-browser
- npm.io page: https://npm.io/package/@schibsted/account-sdk-browser

## Recent versions

- 6.0.0 (latest) — 2026-10-20
- 6.0.0-alpha.17 — 2026-10-20
- 6.0.0-alpha.16 — 2026-10-19
- 6.0.0-alpha.15 — 2026-10-16
- 6.0.0-alpha.14 — 2026-10-15
- 5.3.0 — 2026-10-07
- 6.0.0-alpha.13 — 2026-09-29
- 6.0.0-alpha.12 — 2026-09-25
- 6.0.0-alpha.11 — 2026-09-24
- 6.0.0-alpha.10 — 2026-09-01
- 6.0.0-alpha.9 — 2026-09-01
- 6.0.0-alpha.8 — 2026-08-19
- 6.0.0-alpha.7 — 2026-08-06
- 6.0.0-alpha.6 — 2026-07-30
- 6.0.0-alpha.5 — 2026-07-22
- … 105 more at https://npm.io/package/@schibsted/account-sdk-browser/versions

## README

# Schibsted Account SDK for browsers

Welcome! This is the home of the Schibsted Account JavaScript SDK for browsers. Use it to let users
sign up and log in with Schibsted Account, read the current session, and check access to products
and features.

See the [public SDK documentation](https://schibsted.github.io/account-sdk-browser/) for setup,
integration guidance, and the API reference.

## Before You Start

The SDK communicates mainly with Session Service on a brand domain such as `id.vg.no`. Your website
and Session Service domain must share the same top-level site so browser cookies are sent with XHR
requests.

For local development:

- serve your site over HTTPS, because Session Service is hosted over HTTPS
- use a local hostname with the same top-level site as the configured Session Service domain

For example, if your pre-production site is `pre.sdk-example.com` and uses
`id.pre.sdk-example.com` as Session Service, use a local hostname such as
`local.sdk-example.com`.

If this is a new site and you do not have a `sessionDomain` yet, contact
[support](mailto:schibstedaccount@schibsted.com).

## Development

Dependencies are installed from [Schibsted Artifactory](https://artifactory.schibsted.io) (see [`.npmrc`](./.npmrc)),
so npm must be authenticated to it before `npm install`. The private `@schibsted/consent-url-utils` package is
bundled into `dist/` by Vite during `npm run build`, so SDK consumers do not need access to it.

Install dependencies and run the standard checks:

```sh
npm ci
npm run build
npm test
npm run lint
npm run typecheck
```

## API Documentation

Public API documentation is generated from TypeScript source comments with TypeDoc.

Documentation commands:

- `npm run docs:build` generates the documentation once in `docs/`.
- `npm run docs:watch` rebuilds `docs/` when source files change, without starting a server.
- `npm run docs:preview` builds and serves the documentation locally in the versioned layout.
- `npm run docs:test` tests documentation versioning and publishing.

Generated docs are written to `docs/` and are not committed.

After npm publishing succeeds, the
[documentation workflow](./.github/workflows/github-pages.yml) builds docs from the release tag and
adds them to the public
[`schibsted/account-sdk-browser`](https://github.com/schibsted/account-sdk-browser) repository.
Existing versions remain available, and the documentation root and version selector point to the
latest stable published version.

To publish an existing release again, run the documentation workflow manually with its tag.
Publishing requires the `public-docs` environment with a `PUBLIC_GITHUB_DOCS_DEPLOY_KEY` secret
containing the private key for a write-enabled deploy key configured in the public repository.

## Example Project

The internal example integration is available in the
[sdk-example repository](https://schibsted.ghe.com/user-identity/sdk-example).

## Publishing

Versioning and changelog updates are handled by
[Release Please](https://github.com/googleapis/release-please). The release configuration lives in
[`release-please-config.json`](./release-please-config.json), and publishing to
[npmjs.org](https://www.npmjs.com/package/@schibsted/account-sdk-browser) is handled by the
[npm-publish workflow](./.github/workflows/npm-publish.yml) when a GitHub Release is published.

Use [Conventional Commits](https://www.conventionalcommits.org/) for changes that should be picked
up by release automation.

## License

Copyright (c) 2026 Schibsted Products & Technology AS

Licensed under the [MIT License](./LICENSE.md).

---
_Source: https://npm.io/package/@schibsted/account-sdk-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
