mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 19:40:05 -07:00
fix(plex-oauth): 🐛 Fixed an issue where using OAuth you could log in as a Ombi Local user #4835
This commit is contained in:
parent
86d9837ba2
commit
4098da305a
1 changed files with 2 additions and 2 deletions
|
@ -209,14 +209,14 @@ namespace Ombi.Controllers.V1
|
|||
// Could this be an email login?
|
||||
user = await _userManager.FindByEmailAsync(account.user.email);
|
||||
|
||||
if (user == null)
|
||||
if (user == null || user.UserType != UserType.PlexUser)
|
||||
{
|
||||
return new UnauthorizedResult();
|
||||
}
|
||||
}
|
||||
|
||||
user.MediaServerToken = account.user.authentication_token;
|
||||
await _userManager.UpdateAsync(user);
|
||||
await _userManager.UpdateAsync(user);
|
||||
|
||||
return await CreateToken(true, user);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue