Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-keycloak/keycloak-ts

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-keycloak/keycloak-ts

Keycloak typescript adapter

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by18.72%
Maintainers
2
Weekly downloads
 
Created
Source

KeycloakTS

Typescript porting of Keycloak javascript client

:construction: WIP: Under development :construction:

NPM (scoped)

License Github Issues

Gitter


Table of Contents


Install

yarn add @react-keycloak/keycloak-ts

or

npm install @react-keycloak/keycloak-ts

Getting Started

KeycloakTS provides a porting of the original Keycloak javascript adapter to allow better extensibility and usage on different platform by using custom adapters.

Create a custom KeycloakAdapter

Create a class which implements the KeycloakAdapter interface

import type { KeycloakAdapter } from '@react-keycloak/keycloak-ts';

// Wrap everything inside ReactNativeKeycloakProvider
class MyCustomAdapter implements KeycloakAdapter {
  ...
};

export default MyCustomAdapter;

Setup Keycloak instance

import { KeycloakClient } from '@react-keycloak/keycloak-ts';

import MyCustomAdapter from './adapter.ts';

// Setup Keycloak client as needed
// Pass initialization options as required
const keycloak = new KeycloakClient({
  url: 'http://keycloak-server/auth',
  realm: 'kc-realm',
  clientId: 'web'
});

// Call init passing a custom adapter

keycloak.init({
  adapter: MyCustomAdapter,
});

export default keycloak;

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

FAQs

Package last updated on 21 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc