Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Last active August 29, 2015 14:26
Show Gist options
  • Save meeDamian/9f592d6f3b370693ad7e to your computer and use it in GitHub Desktop.
Save meeDamian/9f592d6f3b370693ad7e to your computer and use it in GitHub Desktop.
I do know that's evil
'use strict'
class AuthTranslator
constructor: (profile) ->
@name = {}
{
@id
@provider
@gender
@profileUrl
displayName: @name.display
name:
givenName: @name.first
familyName: @name.last
_json:
bio: @desc
email: @email
} = profile
[@lang, @locale] = profile._json.locale.split '_'
@_profile = @_profile ? {}
@_profile.auth = profile._json
module.exports =
auth: AuthTranslator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment