Framework v2.x

remove #

Removes an authentication strategy, preventing new authentications from using it.

In a cluster environment, the new strategy is automatically removed from all server nodes.

Authentication tokens previously created using that strategy ARE NOT invalidated after using this method.

Arguments #

Copied to clipboard!
remove(name: string): Promise<void>;

Arguments Type Description
Name of the authentication strategy to remove

Return #

The remove function returns a promise, resolved once the strategy has been successfully removed.

This promise is rejected if the strategy to remove does not exist, or if it is owned by another plugin.

Example #

Copied to clipboard!
await context.accessors.strategies.remove('someStrategy');