Skip to content

Commit f4d97b3

Browse files
ENG-677/ENG-3868 - Allow use of OTP codes for email passwordless login w/o API overrides. (#1309)
* working backend * toggle * toggle * tests * libs * double the strategy double the fun * libs * test json * test the phone strategy * fix domain * openapi * fix equals * fix equals * pr feedback * typo * pr feedback
1 parent a530cb9 commit f4d97b3

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/main/java/io/fusionauth/domain/Application.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2025, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-2026, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -546,12 +546,18 @@ public String toString() {
546546
}
547547

548548
public static class PasswordlessConfiguration extends Enableable {
549+
public PasswordlessStrategy emailLoginStrategy = PasswordlessStrategy.ClickableLink;
550+
551+
public PasswordlessStrategy phoneLoginStrategy = PasswordlessStrategy.FormField;
552+
549553
@JacksonConstructor
550554
public PasswordlessConfiguration() {
551555
}
552556

553557
public PasswordlessConfiguration(PasswordlessConfiguration other) {
554558
this.enabled = other.enabled;
559+
this.emailLoginStrategy = other.emailLoginStrategy;
560+
this.phoneLoginStrategy = other.phoneLoginStrategy;
555561
}
556562

557563
@Override
@@ -562,12 +568,16 @@ public boolean equals(Object o) {
562568
if (o == null || getClass() != o.getClass()) {
563569
return false;
564570
}
565-
return super.equals(o);
571+
if (!super.equals(o)) {
572+
return false;
573+
}
574+
PasswordlessConfiguration that = (PasswordlessConfiguration) o;
575+
return emailLoginStrategy == that.emailLoginStrategy && phoneLoginStrategy == that.phoneLoginStrategy;
566576
}
567577

568578
@Override
569579
public int hashCode() {
570-
return Objects.hash(super.hashCode());
580+
return Objects.hash(super.hashCode(), emailLoginStrategy, phoneLoginStrategy);
571581
}
572582

573583
@Override

0 commit comments

Comments
 (0)