i am new to spring security and i am building an web application in which i have 4 different roles i understand that spring use different roles to authorized user but how can i implement it when there are 4 different type of sign up and after sign in i have to send user to 4 different pages like if a user enter as admin i want to send him to admin page if its a customer i want to send him to customer page .
so far i am able to use user detail service to authenticate a single user .
In your configuration define four types of roles and add a custom login success handler. see below as example.
And AuthenticationSuccessHandler goes like this: