diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 10:10:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 10:10:26 +0200 |
commit | 0b6f531653a7a24f82ad65564479a70a9326301a (patch) | |
tree | f65d9c80e0e8ced86a8a9f7b00952bb04413a5b7 /server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js | |
parent | 35a0a924830d84f9ec28c129ec85cb1f45011fb8 (diff) | |
download | PeerTube-0b6f531653a7a24f82ad65564479a70a9326301a.tar.gz PeerTube-0b6f531653a7a24f82ad65564479a70a9326301a.tar.zst PeerTube-0b6f531653a7a24f82ad65564479a70a9326301a.zip |
Suffix external auth username on conflict
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js index 1604a7c41..755dbb62b 100644 --- a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js +++ b/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js | |||
@@ -65,6 +65,22 @@ async function register ({ | |||
65 | } | 65 | } |
66 | }) | 66 | }) |
67 | } | 67 | } |
68 | |||
69 | { | ||
70 | const result = registerExternalAuth({ | ||
71 | authName: 'external-auth-7', | ||
72 | authDisplayName: () => 'External Auth 7', | ||
73 | onAuthRequest: (req, res) => { | ||
74 | result.userAuthenticated({ | ||
75 | req, | ||
76 | res, | ||
77 | username: 'existing_user2', | ||
78 | email: 'custom_email_existing_user2@example.com', | ||
79 | displayName: 'Existing user 2' | ||
80 | }) | ||
81 | } | ||
82 | }) | ||
83 | } | ||
68 | } | 84 | } |
69 | 85 | ||
70 | async function unregister () { | 86 | async function unregister () { |