Skip to content

nibyou/keycloak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nibyou Keycloak Module for NestJS

This package is a NestJS Module that integrates Keycloak authentication into existing Nibyou Microservices based on NestJS.

Installation

You can easily use this package to integrate Keycloak auth in your NestJS Services.

Add the package:

npm i --save @nibyou/keycloak

or

yarn add @nibyou/keycloak

Then you need to add the following configuration to your root .env file:

KEYCLOAK_URL=https://KEYCLOAK.YOURDOMAIN.TLD/auth
KEYCLOAK_REALM=master
KEYCLOAK_CLIENT=master-ui
KEYCLOAK_SECRET=some-very-secure-secret

Poissibly newer env variables can be found here.

Usage

In your app.module.ts you can now add:

import { KeycloakModule } from '@nibyou/keycloak'; // <-- the import

@Module({
  imports: [
    KeycloakModule, // <-- add the module to your app module
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

About

NestJS Keycloak Module for Microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published