Hello. I’m not exactly sure what I am doing wrong, and it seems to be a corner case, but we actually had some real users encountering this problem so I need to address it.
I can reproduce the issue by having two browser tabs open. In the first tab I login with redirect
this.state.auth0Client.loginWithRedirect({
mode: 'login',
login_hint: email // 'email1@login.com'
});
I get redirected to the aut0 hosted login page, the correct email is prefilled in the email field, and I can also see in the request URL that the same email is present there as the hint.
I login and receive id token, which also contains the right email (email1@login.com), and I see some cookies are created…
I then use this idToken to authorize on our end against our own auth service.
Now I go to the next tab and login again, but with a different email:
this.state.auth0Client.loginWithRedirect({
mode: 'login',
login_hint: email // 'email2@login.com'
});
This time, I can see again the the request url to the hosted login page, that the new email (email2@login.com) is passed as the login_hint param again. But instead of being able to signin to this account, the login page is skipped, and I receive idToken from last logged in user.
I assume, that this is beacuse the hosted login page recognizes the cookies from earlier, and logs me in based on that. This is neat, if its actually the same user, and they can skip the whole password thing. But it becomes a problem in our case, when a new email, is treated as same user (from cookies - or how else this request is identified)
I guess the login_hint is not enough to tell the hosted login page that this is in fact a new unique login attempt? I would still want to user to be able to skip the password is the email is the same as the already authorized user, but when entering a new email, I would like to perform a new unique sign in of the new user.
I hope this makes sense, and that someone here can tell me what I am doing wrong.
Best Regards, Rasmus