0.7.7 • Published 2 years ago
@highoutput/email-auth v0.7.7
email-auth
TODO: description
Usage
import EmailAuthentication from '@highoutput-library/email-auth';
const PERSISTENCE_CONFIG = {
db: mongoose.connection,
userCollectionString: 'users',
};
const persistenceAdapter = new MongooseAdapter(PERSISTENCE_CONFIG);
const EMAIL_PROVIDER_CONFIG = {
apiKey: process.env.SENDGRID_API_KEY as string,
from: {
email: process.env.SENDER_EMAIL as string || 'emailauth@hov.co',
name: process.env.SENDER_NAME as string || 'no-reply',
}
};
const emailProviderAdapter = new SendGridAdapter(EMAIL_PROVIDER_CONFIG);
const server = http.createServer();
const emailAuthentication = new EmailAuthentication({
server,
persistenceAdapter,
emailProviderAdapter,
jwtSecretKey: 'SECRET',
});
emailAuthentication.use();
generateOtp
// POST localhost:8080/generateOtp
{
"message": {
"to": "ralphcasipe1@gmail.com"
}
}
validateOtp
// POST localhost:8080/validateOtp
{
"email": "ralphcasipe1@gmail.com",
"otp": "257057"
}
0.7.7
2 years ago
0.7.6
2 years ago
0.7.5
2 years ago
0.7.4
2 years ago
0.7.3
2 years ago
0.7.1
2 years ago
0.7.0
2 years ago
0.5.0
2 years ago
0.4.2
2 years ago
0.4.0
2 years ago
0.3.2
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.2.0-rc.7
2 years ago
0.2.0-rc.6
2 years ago
0.2.0-rc.5
2 years ago
0.2.0-rc.4
2 years ago
0.1.0-rc.1
2 years ago
0.1.0
2 years ago
0.1.0-rc.7
2 years ago
0.1.0-rc.5
2 years ago
0.1.0-rc.3
2 years ago