You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on integrating Azure Active Directory (Azure AD) OAuth2 login functionality into a Vaadin CRM application I'm developing for practice, based on a tutorial setup. I have followed the instructions to register the application on the Azure portal and configured the application's settings accordingly.
Issue Description
Despite setting up everything as per the guidelines, I am encountering a persistent issue where the application fails to redirect to Azure for authentication. Instead, it redirects back to the local /login page. Here are the details of my current setup:
Registered App on Azure Portal
Redirect URI Configured: http://localhost:8090/login/oauth2/code/aad
Application.yml Configuration: I have configured the .yml file as per the Azure setup instructions.
@EnableWebSecurity @configuration
public class SecurityConfig extends VaadinWebSecurity {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth ->
auth.requestMatchers(
AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/images/*.png")).permitAll());
super.configure(http);
setLoginView(http, LoginView.class); // link http and the LoginView
}
@Bean
public UserDetailsService users() {
UserDetails user = User.builder()
.username("user")
.password("{bcrypt}$2a$10$GRLdNijSQMUvl/au9ofL.eDwmoohzzS7.rmNSJZ.0FxO/BTk76klW")
.roles("USER")
.build();
UserDetails admin = User.builder()
.username("admin")
.password("{bcrypt}$2a$10$GRLdNijSQMUvl/au9ofL.eDwmoohzzS7.rmNSJZ.0FxO/BTk76klW")
.roles("USER", "ADMIN")
.build();
return new InMemoryUserDetailsManager(user, admin);
}
}
Request
I would appreciate it if you could review my configuration or provide any insights into what might be causing this redirection issue. If there is a common pitfall or additional configuration step that I might be missing, your guidance would be highly valuable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently working on integrating Azure Active Directory (Azure AD) OAuth2 login functionality into a Vaadin CRM application I'm developing for practice, based on a tutorial setup. I have followed the instructions to register the application on the Azure portal and configured the application's settings accordingly.
Issue Description
Despite setting up everything as per the guidelines, I am encountering a persistent issue where the application fails to redirect to Azure for authentication. Instead, it redirects back to the local /login page. Here are the details of my current setup:
Registered App on Azure Portal
Redirect URI Configured: http://localhost:8090/login/oauth2/code/aad
Application.yml Configuration: I have configured the .yml file as per the Azure setup instructions.
@EnableWebSecurity
@configuration
public class SecurityConfig extends VaadinWebSecurity {
}
Request
I would appreciate it if you could review my configuration or provide any insights into what might be causing this redirection issue. If there is a common pitfall or additional configuration step that I might be missing, your guidance would be highly valuable.
Thank you for your time and assistance.
Beta Was this translation helpful? Give feedback.
All reactions