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
Back to sign in link from self-registration page is not working as expected in My account in organizations as the URL is not encoded properly. It will return a 400 error code.
Follow the steps to reproduce it.
Steps to Reproduce
Log into the console as admin
Share My account with all organizations
Enable self-registration including organizations and etc using the deployment.toml config
Create a new organization
Logout and go to the My Account of the created organization
Click on Register and you'll be directed to the sign up page (step 3 is needed to make the Register link visible)
Click on Sign in to go back to login page, it will fail with error 400, the root cause is the not encoded url, there is a json object (claims) on the URL
For the record if someone reach this. I workarounded it by creating an interceptor/middleware in Cloudflare Worker until it is fixed the Worker will re-write the URL by encoding it, find code below if anyone is interested.
exportdefault{asyncfetch(request){leturl=newURL(request.url);// Check if the request matches the specific pathif(url.pathname.startsWith('/o/')&&url.pathname.includes('/authenticationendpoint/login.do')){// Encode the 'claims' query parameterif(url.searchParams.has('claims')){letclaims=url.searchParams.get('claims');url.searchParams.set('claims',encodeURIComponent(claims));}// Encode other query parameters as needed// For example, encoding 'redirect_uri'if(url.searchParams.has('redirect_uri')){letredirectUri=url.searchParams.get('redirect_uri');url.searchParams.set('redirect_uri',encodeURIComponent(redirectUri));}// Update the hostname to point to the origin serverurl.hostname='example.com';}// Forward the modified request to the originreturnfetch(url.toString(),request);}};
Description
Back to sign in link from self-registration page is not working as expected in My account in organizations as the URL is not encoded properly. It will return a 400 error code.
Follow the steps to reproduce it.
Steps to Reproduce
deployment.toml
configclaims
) on the URLVersion
IS 7.1.0
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: