• Modules
  • Authentication
  • Auth Username Password
View Source Code

Auth Username Password

Sign In with Username and Password

Sign in a user with a username and password.

Request

  • username
    string
  • password
    string

Response

  • token
    object
    • token.token
      string
    • token.id
      string
    • token.type
      string
    • token.meta
      any value
    • token.createdAt
      string
    • token.expireAt
      nullable string
    • token.revokedAt
      nullable string

Usage

1. Install the module

2. Use this script

const data = await ctx.modules.auth_username_password.sign_in({
  // Request body
});