New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/generic-auth

Package Overview
Dependencies
Maintainers
1
Versions
1325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/generic-auth - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2-alpha-a204f5e.0

10

index.d.ts

@@ -6,4 +6,4 @@ import { DefaultContext, Plugin } from '@envelop/types';

}
export declare type ResolveUserFn<UserType, ContextType = unknown> = (context: ContextType) => null | UserType | Promise<UserType | null>;
export declare type ValidateUserFn<UserType, ContextType = unknown> = (user: UserType, context: ContextType, resolverInfo?: {
export declare type ResolveUserFn<UserType, ContextType = DefaultContext> = (context: ContextType) => null | UserType | Promise<UserType | null>;
export declare type ValidateUserFn<UserType, ContextType = DefaultContext> = (user: UserType, context: ContextType, resolverInfo?: {
root: unknown;

@@ -15,3 +15,3 @@ args: Record<string, unknown>;

export declare const DIRECTIVE_SDL = "\n directive @auth on FIELD_DEFINITION\n";
export declare type GenericAuthPluginOptions<UserType, ContextType> = {
export declare type GenericAuthPluginOptions<UserType extends {} = {}, ContextType extends DefaultContext = DefaultContext> = {
/**

@@ -59,2 +59,4 @@ * Here you can implement any custom sync/async code, and use the context built so far in Envelop and the HTTP request

export declare function defaultValidateFn<UserType, ContextType>(user: UserType, contextType: ContextType): void;
export declare const useGenericAuth: <UserType extends {}, ContextType extends DefaultContext = DefaultContext>(options: GenericAuthPluginOptions<UserType, ContextType>) => Plugin<ContextType>;
export declare const useGenericAuth: <UserType extends {} = {}, ContextType extends DefaultContext = DefaultContext>(options: GenericAuthPluginOptions<UserType, ContextType>) => Plugin<{
validateUser: ValidateUserFn<UserType, ContextType>;
}>;

2

package.json
{
"name": "@envelop/generic-auth",
"version": "0.0.1",
"version": "0.0.2-alpha-a204f5e.0",
"sideEffects": false,

@@ -5,0 +5,0 @@ "peerDependencies": {

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