Skip to content

Instantly share code, notes, and snippets.

@switz
Created January 10, 2012 00:43
Show Gist options
  • Save switz/1586020 to your computer and use it in GitHub Desktop.
Save switz/1586020 to your computer and use it in GitHub Desktop.
everyauth.debug = true;
everyauth.openid
.myHostname('http://local.host:3000')
.simpleRegistration({
"nickname" : true
, "email" : true
, "fullname" : true
, "dob" : true
, "gender" : true
, "postcode" : true
, "country" : true
, "language" : true
, "timezone" : true
})
.attributeExchange({
"http://axschema.org/contact/email" : "required"
, "http://axschema.org/namePerson/friendly" : "required"
, "http://axschema.org/namePerson" : "required"
, "http://axschema.org/namePerson/first" : "required"
, "http://axschema.org/contact/country/home": "required"
, "http://axschema.org/media/image/default" : "required"
, "http://axschema.org/x/media/signature" : "required"
})
.findOrCreateUser(function(session, userMetadata) {
return usersByOpenId[userMetadata.claimedIdentifier] || (usersByOpenId[userMetadata.claimedIdentifier] = addUser('openid', userMetadata));
})
.redirectPath('/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment