2020-04-29 02:04:42 -05:00
|
|
|
async function register ({
|
|
|
|
registerExternalAuth,
|
|
|
|
peertubeHelpers
|
|
|
|
}) {
|
|
|
|
{
|
|
|
|
const result = registerExternalAuth({
|
|
|
|
authName: 'external-auth-3',
|
2020-04-30 02:28:39 -05:00
|
|
|
authDisplayName: () => 'External Auth 3',
|
2020-04-29 02:04:42 -05:00
|
|
|
onAuthRequest: (req, res) => {
|
|
|
|
result.userAuthenticated({
|
|
|
|
req,
|
|
|
|
res,
|
|
|
|
username: 'cid',
|
|
|
|
email: 'cid@example.com',
|
|
|
|
displayName: 'Cid Marquez'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async function unregister () {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
register,
|
|
|
|
unregister
|
|
|
|
}
|
|
|
|
|
|
|
|
// ###########################################################################
|