-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error has occurred: The redirect URI included is not valid / window.setup_signup_team_page is not a function #1899
Comments
Gitlab version 8.3.4 , When i login with gitlab: An error has occurred: The redirect URI included is not valid. Help me. |
The error logs snippet:
|
Should be fixed in latest release, please let us know if it's not fixed? |
Still can't work! The version 1.4.0 gitlab version 8.3.4. |
I started clean on my mac. After going to localhost:8065, see this similar error in logs which is causing sign up page to not show up.
Version: 1.4.0 |
Not able to repro this, please post to trouble shooting forum with information requested? Others from the community may be able to help narrow this down, |
is this solved???? |
I'm experiencing the same issue. I can't login with the Gitlab SSO. To work around this I have set the redirect urls in Gitlab to http. |
Thanks to everyone for the follow-ups, Closing this thread so we can move troubleshooting discussion into single thread on troubleshooting forum on |
@marchoh is spot on here; the In the screenshot below, note that the GitLab button provided by Mattermost is using the correct GitLab, however, attempts to redirect back to Here is the complete URL:
Manually modifying the Clicking "Approve" redirects you to the following Mattermost screen: And also generates this
Digging into GitLab's source, brings me here: Here I'd thought I'd figured it out, and that A little lower in So, I was even more confident I'd figured it out, but setting So, that's where I'm at currently, and I'll update this issue if I figure out the rest. <3 |
Looks like http://stackoverflow.com/questions/25775543/wildcard-support-for-doorkeeper-redirect-uris And... |
@johnjamesjacoby I'm running into the same issue trying to run the stack behind a load balancer in rancher. Have you found a workaround? |
@mildlyill No workaround yet, but I'm about to update to the latest version of GitLab and look into this again. I'll report back once I've made some progress. |
So... I have no idea what exactly the fix was, but updating to GitLab v8.10.5 and using Mattermost 3.3.0 RC 5, I'm finally able to successfully sign into Mattermost with our GitLab SSO. |
I fixed it by modifying Mattermost Nginx/Apache header (i'm using the docker production setup but it applies to classic setup or Gitlab Mattermost) Change If you access your mattermost instance via a ssl configured reverse proxy / or load balancer, and that the bundled mattermost web server is configured as http only, its $scheme variable will pass "http" to GitLab, regardless of other settings, so you have to manually set it to "https" in order for gitlab to generate https callback links. |
That makes sense to me. We may have done the same inadvertently during an audit, not thinking it would fix this exactly. |
@fculpo: Did you add that to mattermost_nginx ? or gitlab's nginx? btw, I'm on omnibus |
@farahfa Maybe both, maybe neither. Totally depends on your setup. In our case, our GitLab server does not sit behind the load balancer, but our Mattermost server does. This is because we didn't want the load balancer worrying about balancing So for us, both our load balancer and our GitLab server automatically 301 redirect non-HTTPS traffic to an Our load balancer does not communicate between web servers using SSL; it uses port 80 and nginx's If your Mattermost installation is not behind a load balancer (meaning it is immediately world-accessible via some DNS) my recommendation would be to force to Either way, if you're running an entirely SSL setup using nginx for your web-servers, I would recommend server rules something like the following to force every incoming web request to serve the
|
@mildlyill Since updating to latest versions of GitLab, Mattermost, Nginx, and Ubuntu 16.04 on both servers, we have yet to see any recurrence of this issue. It's a lot of work, but I think my next suggestion is to get everything up-to-latest, pray for rain, and comment back here if there's no joy. |
Thank you @johnjamesjacoby for the information, our setup is as follows, both Gitlab and Mattermost are behind ELBs and the HTTPS is handled from the ELBs. Also our Gitlab's version is Gitlab is an omnibus installation, and our
|
Okay so I noticed that
So, I manually changed that to |
@farahfa You're welcome. I'll continue trying to help, based on our currently functioning setup. Keep in mind, our infrastructure setups are a bit different. Here is ours, for context:
My best guess recommendation would be to try this on anything behind your load balancer:
(I'm unsure if In addition, in your GitLab config, ensure that:
(Our port is 443, because it's public. Your port should probably be 80, behind your load balancer.) And in your Mattermost config, ensure:
I'll keep looking around for other related configuration options, and update this reply if I find them. (Sorry in advance for the configuration differences. Having not installed these 2 together in the traditional way means I'm not confident how the option keys map. Hopefully you're able to do so.) |
Something that's also easy to forget, after these configuration changes, remember to restart/reload the related services so that your changes take effect. I'd even go as far as cleaning out cookies and local storage in your browser for both. We've seen intermittent cache weirdness in Mattermost after updates, and there are so many dependencies and moving parts that it's not immediately obvious if something is stuck, or if something needs a restart, etc... |
Yeah, I keep on restarting nginx everytime I do a manual change.. But still no luck. My problem now is different than OP's so maybe it's better to open a new issue rather than hijack this one.. I really do appreciate your help @johnjamesjacoby . 😄 EDIT: DOH!!! The error that I was getting was due to certificate problems which I've now fixed.. So for me @fculpo's solution worked best for me!
Update: The Nginx config problem was fixed in Gitlab version 8.11.2 (I believe). |
Great ! My setup is the following: Both behind an nginx reverse proxy I modified the $scheme from the nginx webserver serving mattermost (so the last one in the chain), because this one is configured to listen only in http, but nees to talk to gitlab as if it served https. A clarified official documentation could be useful. |
Originally everything worked fine for me. After a few updates of both GitLab and Mattermost the authentication broke. First of all, My Setup: As @johnjamesjacoby mentioned before the Mattermost SSO button generates a wrong uri, even in the desktop app (by the way it's a webkit frame opening the website). How I solved this issue |
Changing mattermost services urls to https in GitLab and then changing the mattermost_external_url in gitlab.rb fixed my issue. i am able to logon and use it now. |
Had the same problem and the discussion above about the callback URIs led me to Turned out that I had a wrong URL listed "mattermost.example.com" and in gitlab.rb I had "mm.example.com". Changed it to the value in gitlab.rb and it worked like a charm. |
Am having a similar issue but not wiht Mattermost but with Drone. I constantly get the same error. |
Same issue. Solved setting "Site URL" in general configuration options |
so in case anyone else finds this in my situation, i'm using docker (with traefik) to deploy a bunch of services (gitlab and mattermost included), and traefik (as proxy to all these services) handles the ssl, so i don't tell the individual apps (eg mattermost) to force/expect SSL, BUUUUUT I needed (as everyone here has been saying) to update my Site URL to have |
Installing GitLab from source, and Mattermost https://github.com/mattermost/platform/archive/release-1.4.zip install step by step followhttps://github.com/mattermost/platform/blob/master/doc/install/Production-RHEL6.md.
Integrations gitlab and mattermost follow https://github.com/mattermost/platform/blob/master/doc/integrations/Single-Sign-On/Gitlab.md
The text was updated successfully, but these errors were encountered: