@isnolan/nestjs-auth
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Auth Module for NestJS

AuthModule is a powerful NestJS module designed to streamline auth management by providing seamless integration with popular auth platforms such as Google Sign in, and Apple Sign in .

version downloads license

Features

  • Effortless integration with Google sign in, and Apple Sign in.
  • Supports both synchronous and asynchronous configurations.

Getting Started

Installation

PNPM

Using PNPM Install the package along with the Stripe peer dependency:

pnpm install --save @isnolan/nestjs-auth

Import

Asynchronous configuration

Synchronous Configuration To utilize SubscriptionModule, import and add it to the imports array of your NestJS module, typically AppModule. Here's a synchronous configuration example:

Synchronous configuration

import { AuthModule } from '@isnolan/nestjs-auth';

@Module({
  imports: [
    AuthModule.forRoot({
      google: {
        clientId: `${process.env.GOOGLE_CLIENT_ID}`
      }
    }),
  ],
  providers: [AppService],
})
export class AppModule {}

Asynchronous configuration

Asynchronous Configuration SubscriptionModule also supports asynchronous configuration, useful for determining configurations dynamically at runtime:

import { AuthModule } from '@isnolan/nestjs-auth';
import { ConfigService } from '@nestjs/config';

@Module({
  imports: [
    AuthModule.forRootAsync({
      inject: [ConfigService],
      useFactory: async (config: ConfigService) => config.get('auth'),
    }),
  ],
  providers: [AppService],
})
export class AppModule {}

License

MIT License

Package Sidebar

Install

npm i @isnolan/nestjs-auth

Weekly Downloads

15

Version

0.1.2

License

ISC

Unpacked Size

8.07 MB

Total Files

8

Last publish

Collaborators

  • yhostc