Skip to content

Strivacity/sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

178 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

JavaScript SDK

Strivacity JavaScript SDK

This repository contains the Strivacity JavaScript SDK — a collection of framework-specific packages and example applications for integrating Strivacity's policy-driven authentication journeys into JavaScript and TypeScript applications.

The SDK uses the OAuth 2.0 PKCE flow and supports redirect, popup, native, and embedded modes.


Repository structure

This is a pnpm monorepo. It contains:

  • packages/ — Publishable SDK packages
  • apps/ — Example applications for each framework

SDK packages

Package Description
sdk-core Framework-agnostic core SDK. Required by all other packages.
sdk-angular Angular integration
sdk-next Next.js integration
sdk-nuxt Nuxt integration
sdk-react React integration
sdk-remix Remix integration
sdk-svelte Svelte integration
sdk-vue Vue.js integration

Example applications

App Framework
apps/web-component Vanilla JS / Web Component
apps/angular Angular
apps/angular-bff Angular (Backend for Frontend)
apps/next Next.js
apps/next-headless Next.js (headless / Native Journey)
apps/nuxt Nuxt
apps/react React
apps/remix Remix
apps/svelte Svelte
apps/vue Vue.js
apps/ionic-angular Ionic + Angular
apps/ionic-react Ionic + React
apps/ionic-vue Ionic + Vue.js

Note: apps/backend is an Express server exclusively for the angular-bff example. It implements the Backend for Frontend (BFF) pattern - handling the OAuth 2.0 PKCE flow, managing server-side sessions, and exposing a /api/session/* REST API that the Angular BFF frontend calls instead of communicating with the identity provider directly. It is not a standalone example application and is not needed by any other app.


Prerequisites


Setup

Clone the repository and install dependencies:

git clone https://github.com/Strivacity/sdk-js.git
cd sdk-js
pnpm install

Environment configuration

Before running any example application, create a .env.local file in the repository root by copying .env.local.example and filling in your values:

cp .env.local.example .env.local
Variable Description
VITE_ISSUER Your Strivacity cluster domain (e.g. https://your-tenant.strivacity.com)
VITE_CLIENT_ID The client ID of your application
VITE_SCOPES Space-separated list of scopes to request (e.g. openid profile)

Building SDK packages

pnpm build

Running example applications

pnpm app:wc:serve            # Web Component
pnpm app:angular:serve       # Angular
pnpm app:next:serve          # Next.js
pnpm app:next-headless:serve # Next.js headless
pnpm app:nuxt:serve          # Nuxt
pnpm app:react:serve         # React
pnpm app:remix:serve         # Remix
pnpm app:vue:serve           # Vue.js
pnpm app:ionic-angular:serve # Ionic + Angular
pnpm app:ionic-react:serve   # Ionic + React
pnpm app:ionic-vue:serve     # Ionic + Vue.js
pnpm app:angular-bff:serve   # Angular (Backend for Frontend)
pnpm app:backend:serve       # BFF backend (required for angular-bff)

Contributing

Please see the contributing guide.

Vulnerability Reporting

See the Guidelines for responsible disclosure for reporting security issues. Please do not report security vulnerabilities on the public issue tracker.

License

Available under the MIT License. See the LICENSE file for details.

About

No description or website provided.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors