BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
.
/
lib
/
node_modules
/
pm2
/
node_modules
/
enquirer
/
lib
/
types
📤 Upload
📝 New File
📁 New Folder
Close
Editing: auth.js
'use strict'; const FormPrompt = require('../prompts/form'); const defaultAuthenticate = () => { throw new Error('expected prompt to have a custom authenticate method'); }; const factory = (authenticate = defaultAuthenticate) => { class AuthPrompt extends FormPrompt { constructor(options) { super(options); } async submit() { this.value = await authenticate.call(this, this.values, this.state); super.base.submit.call(this); } static create(authenticate) { return factory(authenticate); } } return AuthPrompt; }; module.exports = factory();
Save
Cancel