keeping user logged in after registeration code example
Example 1: how to set state for logged in users
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
bcrypt = require('bcrypt'),
SALT_WORK_FACTOR = 10;
var UserSchema = new Schema({
username: { type: String, required: true, index: { unique: true } },
password: { type: String, required: true }
});
module.exports = mongoose.model('User', UserSchema);
Example 2: abp session logged in user
[DependsOn(
typeof(MyAppApplicationModule),
typeof(MyAppDataModule))]
public class MyConsoleAppModule : AbpModule {
public override void PreInitialize() {
// set my IAbpSession implementation
Configuration.IocManager.RegisterIfNot(DependencyLifeStyle.Singleton);
}
public override void Initialize() {
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
}