Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created December 7, 2015 19:01
Show Gist options
  • Save rdegges/7c0f9716d63f7a1e93f1 to your computer and use it in GitHub Desktop.
Save rdegges/7c0f9716d63f7a1e93f1 to your computer and use it in GitHub Desktop.
Stormpath express autologin after register example.
'use strict';
var express = require('express');
var stormpath = require('express-stormpath');
var app = express();
app.use(stormpath.init(app, {
client: {
apiKey: {
id: 'xxx',
secret: 'xxx'
}
},
application: {
href: 'https://api.stormpath.com/v1/applications/xxx'
},
website: true,
web: {
register: {
autoLogin: true
}
}
}));
app.on('stormpath.ready', function() {
app.listen(3000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment