6.1.0 • Published 3 years ago
@clevertech.biz/auth-core v6.1.0
CleverAuth Core
Generic auth library for Clevertech.
Testing
You have to run the tests with node v10
or newer
clients.
docker-compose -f test/docker-compose.yml up -d
npm run test
Example
import {
Core,
KnexAdapter,
MongoAdapter,
DefaultEmailService,
Crypto,
JWT,
Validations,
TwilioSMSService
} from '@clevertech.biz/auth-core'
const db = new MongoAdapter('<uri>')
const db = new KnexAdapter({
// knex config here
})
const sms = new TwilioSMSService(
'<accountSid>',
'<authToken>',
'<numberFrom>'
})
const core = new Core({
projectName: '<projectName>',
db,
email: new DefaultEmailService({
projectName: '',
confirmEmailURL: '',
requestResetPasswordURL: '',
resetPasswordURL: '',
emailServiceConfig: {
// config for pnp-email-service
}
}),
crypto: new Crypto('<key>', '<algorithm> = aes-256-gcm'),
jwt: new JWT('<algorithm>', '<secretOrPrivateKey>', '<secretOrPublicKey>', {
// default options: see https://github.com/auth0/node-jsonwebtoken#usage
}),
validations: new Validations(['name', 'company'], true),
sms,
numberOfRecoverCodes: 10
})
6.1.0
3 years ago
6.0.0
3 years ago
5.0.0
3 years ago
3.2.0
4 years ago
3.1.0
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.0
5 years ago
2.0.0-beta.0
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago