ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 2.1 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. async function register ({
  2. registerExternalAuth,
  3. peertubeHelpers
  4. }) {
  5. {
  6. const result = registerExternalAuth({
  7. authName: 'external-auth-3',
  8. authDisplayName: () => 'External Auth 3',
  9. onAuthRequest: (req, res) => {
  10. result.userAuthenticated({
  11. req,
  12. res,
  13. username: 'cid',
  14. email: 'cid@example.com',
  15. displayName: 'Cid Marquez'
  16. })
  17. }
  18. })
  19. }
  20. {
  21. const result = registerExternalAuth({
  22. authName: 'external-auth-4',
  23. authDisplayName: () => 'External Auth 4',
  24. onAuthRequest: (req, res) => {
  25. result.userAuthenticated({
  26. req,
  27. res,
  28. username: 'kefka2',
  29. email: 'kefka@example.com',
  30. displayName: 'Kefka duplication'
  31. })
  32. }
  33. })
  34. }
  35. {
  36. const result = registerExternalAuth({
  37. authName: 'external-auth-5',
  38. authDisplayName: () => 'External Auth 5',
  39. onAuthRequest: (req, res) => {
  40. result.userAuthenticated({
  41. req,
  42. res,
  43. username: 'kefka',
  44. email: 'kefka@example.com',
  45. displayName: 'Kefka duplication'
  46. })
  47. }
  48. })
  49. }
  50. {
  51. const result = registerExternalAuth({
  52. authName: 'external-auth-6',
  53. authDisplayName: () => 'External Auth 6',
  54. onAuthRequest: (req, res) => {
  55. result.userAuthenticated({
  56. req,
  57. res,
  58. username: 'existing_user',
  59. email: 'existing_user@example.com',
  60. displayName: 'Existing user'
  61. })
  62. }
  63. })
  64. }
  65. {
  66. const result = registerExternalAuth({
  67. authName: 'external-auth-7',
  68. authDisplayName: () => 'External Auth 7',
  69. onAuthRequest: (req, res) => {
  70. result.userAuthenticated({
  71. req,
  72. res,
  73. username: 'existing_user2',
  74. email: 'custom_email_existing_user2@example.com',
  75. displayName: 'Existing user 2'
  76. })
  77. }
  78. })
  79. }
  80. }
  81. async function unregister () {
  82. return
  83. }
  84. module.exports = {
  85. register,
  86. unregister
  87. }
  88. // ###########################################################################