From 3ecedd68270fd9c3757579b7925205c77492ec50 Mon Sep 17 00:00:00 2001 From: Adrianmjim Date: Thu, 24 Oct 2024 09:19:21 +0200 Subject: [PATCH] feat(auth): Add BaseSupabaseAuthGuard --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 22cbd0f..eef1b4b 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,8 @@ export class CatService { This library provides a base guard to authenticate requests using the Supabase auth client. ### Usage -To use the `BaseSupabaseAuthGuard`, you need to create a subclass that implements the `extractTokenFromRequest` method. This implementation should define how to extract the token from the request, which might be in the headers, cookies, or query parameters. + +To create your own guard that authenticates against Supabase, you just need to create a new guard that extends `BaseSupabaseAuthGuard` and implements the method `extractTokenFromRequest`. This implementation should define how to extract the token from the request, which might be in the headers, cookies, or query parameters. ```typescript import { Injectable, ExecutionContext } from '@nestjs/common';