Sign up request returns 301 & redirects to wrong page on sign up

As a Developer, when I sign up to an organisation’s portal I am not being redirected to the API Catalogue on successful sign up.

  1. I would first load the Sign Up page which loads successfully.

  2. I would then fill the form and click on Sign Up. As seen below the Gateway performs a POST to send the form data and it returns 301.

  3. See below the details of the request captured in Firefox’s Network Monitor tool.
    The problem is not only about getting a 301 since the user actually gets register but it’s also about that location header not including the host path and therefore after sign up the developer is not redirected to the API Catalogue as it use to be before Tyk 2.0.

Wondering if it could be a problem of the configuration I am sending to the api/portal/configuration
but my guess is that something is not right on the dashboard-api side.

Let me know and I can happily add any information to believe needed to help :wink:

Thanks!

You might want to edit that image - your URL is still leaking (nice theme btw)

1 Like

We’ve tested the portal, and register works fine (we run 2.0 in our Cloud), and the redirect is part of it, though I’m pretty sure we changed it to a 302.

Have you set the portal options up in your tyk_analytics.conf:

"host_config": {
    "enable_host_names": true,
    "disable_org_slug_prefix": true,
    "hostname": "your-dashboard-hostname",
    "override_hostname": "",
    "portal_domains": {},
    "portal_root_path": "/portal"
},

You don’t need portal-domains, as this can be configured at the org level using the drop-down in the dashboard.

Also, the templates in 2.0 are a bit different IIRC, you may need to take a look at them to see the new way that URLs are generated.

Thank you Martin.

I still haven’t found the solution, think my local environment is not picking up the changes so I need a bit more of investigation from this side. I do believe that your answer should work once I fix my local dev.

Also, Do you know where can I find more detailed documentation about “host_config” and “host_config.portal_root_path” ?

Hmmm, potentially - it can be tricky. Are you using B SSL?

The docs around the configuration options are all here:

https://tyk.io/docs/tyk-dashboard-v1-0/configuration/

Hey Martin. I am Raul’s colleague and picked this issue up from him.
Our setting for the portal root path in the host config is currently. “portal_root_path”:""
Something that I have tried is setting it to “portal_root_path”: “/portal” and it started to work OK.
However that meant that all our urls now include /portal in the path. Is there anything else that you could suggest please. This issue only is when we hit signup on the registration page. All other pages redirect successfully.

Have you tried to set the portal root path to be “/”?

The templates will try and react accordingly, but may need manual intervention as the default portal install is under /portal usually.

You can always just edit the templates themselves (they are in the /portal folder of the dashboard installation) - if you change the URLs manually then you need to restart the dashboard process so the changes are loaded.

Let me know if either of the above helps.

Sure, have tried setting it to “/” and that doesn’t seem to solve the issue either.

This is a POST operation when we register. So I am unsure if I will be able to change the URLs in the templates unless I am missing something.

Looks like you are correct, there’s a bug in the redirect. We’ve fixed it in our dev branch and it should be fixed in our automatic build in a few hours (see the nightlies section in our docs). Dev is currently very close to the latest release so is stable.

Thanks very much Martin… I will give it a try and let you know how it goes.

1 Like