It was using the after_sign_in_path_for callback in the ApplicationController meant for learners sign in. It tries to find a stored location and will fallback to the learners dashboard if there is none. Because we're signing in as an admin, it was failing an auth check when redirecting to the learners dashboard and redirecting again to the learner sign in page.
closes: #4601
This commit:
Override the after_sign_in_path_for callback with admin specific behaviour when signing in as an admin.
Because:
after_sign_in_path_for
callback in the ApplicationController meant for learners sign in. It tries to find a stored location and will fallback to the learners dashboard if there is none. Because we're signing in as an admin, it was failing an auth check when redirecting to the learners dashboard and redirecting again to the learner sign in page.This commit:
after_sign_in_path_for
callback with admin specific behaviour when signing in as an admin.