```coffeescript
BaseModel = require './base'
crypto = require 'crypto'
uuid = require 'uuid'
_ = require 'underscore'

class UserCredential extends BaseModel
  constructor: (options) ->
    super options

    @required = ['userid', 'secret']

    if not @secret
      @genSecret()

  genSecret: () ->
    sha = crypto.createHash 'sha256'
    sha.update "#{uuid.v1()}"
    @secret = sha.digest 'hex'


module.exports = UserCredential
```

Add user_identifier to UserCredential Model
user
```coffeescript
BaseModel = require './base'
crypto = require 'crypto'
uuid = require 'uuid'
_ = require 'underscore'

class UserCredential extends BaseModel
  constructor: (options) ->
    super options

    @required = ['userid', 'secret', 'user_identifier']

    if not @secret
      @genSecret()

    if not @user_identifier
      @genIdentifier()

  genSecret: () ->
    sha = crypto.createHash 'sha256'
    sha.update "#{uuid.v1()}"
    @secret = sha.digest 'hex'

  genIdentifier: () ->
    @user_identifier = uuid.v1()


module.exports = UserCredential
```
assistant