feat(auth): send real information on login (#470)

* feat(auth): send real ip on login

* feat(auth): send application name on login
This commit is contained in:
THOMAS B
2024-05-24 18:05:05 +02:00
committed by GitHub
parent fed66f0702
commit d765055da8
2 changed files with 19 additions and 4 deletions

View File

@@ -271,7 +271,13 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
? jellyfinHost.slice(0, -1)
: jellyfinHost;
const account = await jellyfinserver.login(body.username, body.password);
const ip = req.ip ? req.ip.split(':').reverse()[0] : undefined;
const account = await jellyfinserver.login(
body.username,
body.password,
ip
);
// Next let's see if the user already exists
user = await userRepository.findOne({
where: { jellyfinUserId: account.User.Id },