Fix: Whitespaces around the password/username were causing login failures.
This commit is contained in:
parent
0d41c0e345
commit
1287d8f7ac
@ -39,7 +39,7 @@ async def login_for_access_token(
|
||||
device_id: Optional[uuid.UUID] = Cookie(None),
|
||||
):
|
||||
with SessionFuture() as db:
|
||||
user = authenticate_user(form_data.username, form_data.password, db)
|
||||
user = authenticate_user(form_data.username.strip(), form_data.password.strip(), db)
|
||||
if not user:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
|
@ -57,7 +57,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
||||
const { username } = formModel;
|
||||
const { password } = formModel;
|
||||
this.auth
|
||||
.login(username, password)
|
||||
.login(username.trim(), password.trim())
|
||||
// .pipe(first())
|
||||
.subscribe(
|
||||
() => {
|
||||
|
Loading…
Reference in New Issue
Block a user