Background
We're building an internal site where all users are required to be authenticated. I've configured IdentityServer to connect to the organisation's Azure AD and this is working fine. When I log in to my Sitecore Client I can choose "Login with Azure AD" and based on role mappings, I am allowed into the client.
I want our site visitors to also have to go via this login process.
What I've done so far
- I created a blank
login
page on our site. - I checked "Require Login" under Site Grouping for our site
- I pointed the "Login Page" under Site Grouping to my blank login page
At first I tried to follow the steps in this article, instructing me to configure a special security controller. But I misread the article, I only need to do that if I do NOT want the default behaviour of being redirected to Sitecore's login page. So the opposite of what I want.
What happens
It does not behave as intended. Or at least as I expected.
If I navigate to my site now, it redirects me to /login
just fine. But then it ends up in an endless loop. I'm trying to understand why.
The URL ends up looking like this: http://sc911.sc/Demo/login?ReturnUrl=%2fDemo%2flogin%3fReturnUrl%3d%252fDemo%252flogin%253fReturnUrl%253d%25252fDemo%25252flogin%25253fReturnUrl%25253d%2525252fDemo%2525252flogin%2525253fReturnUrl%2525253d%252525252fDemo%252525252flogin%252525253fReturnUrl%252525253d%25252525252fDemo%25252525252flogin%25252525253fReturnUrl%25252525253d%2525252525252fDemo%2525252525252flogin%2525252525253fReturnUrl%2525252525253d%252525252525252fDemo%252525252525252flogin%252525252525253fReturnUrl%252525252525253d%25252525252525252fDemo%25252525252525252flogin%25252525252525253fReturnUrl%25252525252525253d%2525252525252525252fDemo%2525252525252525252flogin%2525252525252525253fReturnUrl%2525252525252525253d%252525252525252525252fDemo%252525252525252525252flogin%252525252525252525253fReturnUrl%252525252525252525253d%25252525252525252525252fDemo%25252525252525252525252flogin%25252525252525252525253fReturnUrl%25252525252525252525253d%2525252525252525252525252fDemo%2525252525252525252525252flogin%2525252525252525252525253fReturnUrl%2525252525252525252525253d%252525252525252525252525252fDemo%252525252525252525252525252flogin%252525252525252525252525253fReturnUrl%252525252525252525252525253d%25252525252525252525252525252fDemo%25252525252525252525252525252flogin%25252525252525252525252525253fReturnUrl%25252525252525252525252525253d%2525252525252525252525252525252fDemo%2525252525252525252525252525252flogin%2525252525252525252525252525253fReturnUrl%2525252525252525252525252525253d%252525252525252525252525252525252fDemo%252525252525252525252525252525252flogin%252525252525252525252525252525253fReturnUrl%252525252525252525252525252525253d%25252525252525252525252525252525252fDemo%25252525252525252525252525252525252flogin%25252525252525252525252525252525253fReturnUrl%25252525252525252525252525252525253d%2525252525252525252525252525252525252fDemo%2525252525252525252525252525252525252flogin%2525252525252525252525252525252525253fReturnUrl%2525252525252525252525252525252525253d%252525252525252525252525252525252525252fDemo%252525252525252525252525252525252525252flogin%252525252525252525252525252525252525253freturnUrl%252525252525252525252525252525252525253d%25252525252525252525252525252525252525252fDemo
At which point my Chrome gives up and throws this at me.
HTTP Error 404.15 - Not Found The request filtering module is configured to deny a request where the query string is too long.
Is there anything else I need to configure, to get this working?
Am on Sitecore 9.1.1, SXA 1.8.1