Mongoose Auth
Description
User authentication plugin for mongoose nodejs orm
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
mongoose-auth
User authentication plugin for mongoose node.js orm.
mongoose-auth enables you to support authorization in any number of ways via authorization strategies.
An authorization strategy is how you authorize your user. Currently mongoose-auth supports the following authorization strategies:
passwordfacebooktwittergithubinstagramgoogle
mongoose-auth does 3 things:
- Schema decoration
- (optional) Drop in routing for connect apps.
- (optional) Dynamic helpers for express apps.
It integrates the [everyauth](https://github.com/bnoguchi/everyauth) module to help it take care of the routing and helpers. everyauth is a general purpose npm module for authentication & authorization that can be used independently of mongoose.
Schema Decoration
As you add successive authorization strategies, mongoose-auth at a bare minimum augments your schema with typed attributes corresponding to parameters related to your chosen authorization strategies. For example, if facebook is one of your authorization strategies, then it will add attributes to your User Schema such as 'fb.id' and 'fb.email'.
To decorate your schema:
var mongoose = require('mongoose')
, Schema = mongoose.Schema
, mongooseAuth = require('mongoose-auth');
var UserSchema = new Schema({});
UserSchema.plugin(mongooseAuth, {
facebook: true
});
Beyond Schema Decoration: Routing
Applications require more than just User Schema augmentation in order to implement a complete authorization strategy. Applications also need routes exposing the one or more steps involved for a given authorization strategy. Moreover, applications each handle in their own unique way how they want to respond to successful or failed logins (in addition to logout handling). If you are not using a [connect](https://github.com/senchalabs
Related Skills
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development