weechat-matrix icon indicating copy to clipboard operation
weechat-matrix copied to clipboard

Clearer instructions for SSO?

Open paulrouget opened this issue 5 years ago • 4 comments

The README instructions are not very easy to understand. My company has a SSO page, but I have no idea how to make it work with the script. I run weechat on raspberry pi over ssh.

paulrouget avatar Feb 03 '20 13:02 paulrouget

What part are you having trouble with? The SSO login works by spawning a new process that starts a HTTP server. Weechat prints out an URL to your SSO sign on page with the redirect URL set to the spawned server.

After you login on your SSO page your web browser goes to the URL server by the HTTP server which forwards the token via STOUD to Weechat.

The exact setup depends on what you want. In any case you need to put the helper script in your PATH and make sure that the dependencies for it are installed (aiohttp).

poljar avatar Feb 03 '20 21:02 poljar

I managed to use it. I made some mistakes because it took me some time to understand that the trigger was not necessary, that it was weechat responsability to call matrix_sso_helper, and also I didn’t know anything about SSO workflow :)

So for people who don’t know anything, and want SSO to work on a weechat instance that is on a remote machine:

  • make sure matrix_sso_helper is in your path (trying to use an absolute path doesn’t work)
  • no need for trigger or anyting
  • /matrix connect yourserver in weechat
  • this will dump an url in the server buffer
  • open that url in your browser
  • after connecting, the browser will try to load localhost. Because weechat run in another machine it will fail. You can try to use the ssh trick found in documentation, or you can just copy paste the URL the failed to load and in the machine that runs weechat do: curl the_url

That’s it.

paulrouget avatar Feb 04 '20 08:02 paulrouget

Glad you got it working.

You can set up the trigger to open a new tmux/screen pane that opens a CLI browser or curl. It's just a convenience thing so you don't need to manually open the SSO URL.

poljar avatar Feb 04 '20 08:02 poljar

I've tried all sorts of combinations here but it just won't try to connect with the sso_helper. i have /usr/bin/matrix_sso_helper installed, but I can't get it going. I've tried it both inside and outside of tmux

fishman avatar May 10 '20 11:05 fishman