1 import { UserRole } from '@shared/models'
3 export type RegisterServerAuthOptions = RegisterServerAuthPassOptions | RegisterServerAuthExternalOptions
5 export interface RegisterServerAuthPassOptions {
6 // Authentication name (a plugin can register multiple auth strategies)
11 // Weight of this authentication so PeerTube tries the auth methods in DESC weight order
14 // Used by PeerTube to login a user
15 // Returns null if the login failed, or { username, email } on success
27 export interface RegisterServerAuthExternalOptions {
28 // Authentication name (a plugin can register multiple auth strategies)
34 export interface RegisterServerAuthExternalResult {
35 onAuth (options: { username: string, email: string }): void