mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
parent
7719117156
commit
205970e4c0
4 changed files with 6 additions and 12 deletions
|
@ -32,8 +32,7 @@ namespace Ombi.Core.IdentityResolver
|
|||
var roles = await UserManager.GetRolesAsync(user);
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new Claim(JwtClaimTypes.Name, user.UserName),
|
||||
new Claim(JwtClaimTypes.Email, user.Email)
|
||||
new Claim(JwtClaimTypes.Name, user.UserName)
|
||||
};
|
||||
|
||||
foreach (var role in roles)
|
||||
|
|
|
@ -87,8 +87,7 @@ namespace Ombi.Core.IdentityResolver
|
|||
var roles = await UserManager.GetRolesAsync(user);
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new Claim(ClaimTypes.Name, user.UserName),
|
||||
new Claim(ClaimTypes.Email, user.Email)
|
||||
new Claim(ClaimTypes.Name, user.UserName)
|
||||
};
|
||||
|
||||
foreach (var role in roles)
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<!--
|
||||
you can substitue the span of reauth email for a input with the email and
|
||||
include the remember me checkbox
|
||||
-->
|
||||
<div *ngIf="form && customizationSettings">
|
||||
<div *ngIf="form && customizationSettings">
|
||||
<div class="container" id="login">
|
||||
<div class="card card-container">
|
||||
<!-- <img class="profile-img-card" src="//lh3.googleusercontent.com/-6V8xOA6M7BA/AAAAAAAAAAI/AAAAAAAAAAA/rzlHcD0KYwo/photo.jpg?sz=120" alt="" /> -->
|
||||
|
@ -21,8 +17,8 @@ include the remember me checkbox
|
|||
|
||||
<form class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
||||
<input type="email" id="inputEmail" class="form-control" formControlName="email" placeholder="Email Address" autofocus>
|
||||
<input type="password" class="form-control" formControlName="password">
|
||||
<input type="password" class="form-control" formControlName="confirmPassword">
|
||||
<input type="password" class="form-control" formControlName="password" placeholder="New Password">
|
||||
<input type="password" class="form-control" formControlName="confirmPassword" placeholder="Confirm New Password">
|
||||
<button class="btn btn-success-outline" [disabled]="form.invalid" type="submit">Reset Password</button>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace Ombi.Controllers
|
|||
[Authorize]
|
||||
public async Task<UserViewModel> GetCurrentUser()
|
||||
{
|
||||
var user = await UserManager.GetUserAsync(User);
|
||||
var user = await UserManager.Users.FirstOrDefaultAsync(x => x.UserName == User.Identity.Name);
|
||||
|
||||
return await GetUserWithRoles(user);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue