Skip to content

Commit

Permalink
Use email for account creation
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 11e077cec24223b2e90a0552639517028c0191a8
  • Loading branch information
pdesgarets authored and Gitlab-CI committed Dec 4, 2024
1 parent 66e9686 commit ec913c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Primary
@Service
public class MyUserDetailsService implements UserDetailsService {
private static final Logger logger = LoggerFactory.getLogger(UserDetailsService.class);
private static final Logger logger = LoggerFactory.getLogger(MyUserDetailsService.class);
private final UserRepository userRepository;
private final RoleRepository roleRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String getLocalTokenFromOIDCToken(String oidcToken) {

// FindorCreate user

User user = myUserDetailsService.upsertUser(new String[]{username, email}, name, lastName);
User user = myUserDetailsService.upsertUser(new String[]{email, username}, name, lastName);
List<String> roles = (List<String>) jwt.getClaim("realm_access").asMap().get("roles");
if (roles.contains("teacher")) {
myUserDetailsService.ensureTeacher(user);
Expand Down

0 comments on commit ec913c0

Please sign in to comment.