Skip to content

Auth package #16

@NickGlenn

Description

@NickGlenn

Simple factory that operates similarly to the resource() method, but generates custom routes for testing login, registration and forgot password. Uses JSON web tokens.

var auth = restfool.auth({
  keyField: 'email' // default
})

server.post('/auth', auth.login)
server.post('/auth/register', auth.register)
server.post('/password/forgot', auth.forgotPassword)
server.post('/password/reset', auth.resetPassword)

Because sending a "reset password" token via email would require an email server to be set up, we could provide the token via the dashboard and/or a notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions