Merge pull request #4935 from ConfusedPolarBear/quickconnect-cleanup

Remove used quick connect tokens
This commit is contained in:
dkanada 2021-02-08 22:54:53 +09:00 committed by GitHub
commit 158e69c6f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1456,7 +1456,12 @@ namespace Emby.Server.Implementations.Session
throw new SecurityException("Unknown quick connect token");
}
request.UserId = result.Items[0].UserId;
var info = result.Items[0];
request.UserId = info.UserId;
// There's no need to keep the quick connect token in the database, as AuthenticateNewSessionInternal() issues a long lived token.
_authRepo.Delete(info);
return AuthenticateNewSessionInternal(request, false);
}