Created
December 7, 2015 19:01
-
-
Save rdegges/7c0f9716d63f7a1e93f1 to your computer and use it in GitHub Desktop.
Stormpath express autologin after register example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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