ement.el icon indicating copy to clipboard operation
ement.el copied to clipboard

SSO Support (also needed for ElementOne)

Open ceearrbee opened this issue 3 years ago • 27 comments

SSO as the login method for servers is becoming popular - such as with Mozilla's, is there any likelihood of this being implemented anytime soon?

ceearrbee avatar Aug 13 '21 01:08 ceearrbee

Hi,

I don't use SSO, so I don't plan to implement it myself (unless someone wanted to sponsor it in some way). But, patches welcome, and I'll be glad to help integrate it. :)

alphapapa avatar Aug 13 '21 06:08 alphapapa

After talking to alphapapa in matrix I wrote the following which could be a helpful jumping off point for integrating sso. According to https://matrix.org/docs/guides/sso-for-client-developers the server should support m.login.sso and m.login.token.

(defun necronian-ement-sso-api (data)
  (let* ((id (cdr (assq 'user_id data)))
         (username (save-match-data
                     (string-match "@\\(.*\\):.*" id)
                     (match-string 1 id)))
         (server (cdr (assq 'home_server data)))
         (uri-prefix (cdr (assq 'base_url
                                (cdr (assq 'm\.homeserver
                                           (cdr (assq 'well_known data)))))))
         (token (cdr (assq 'access_token data))))
    (ement-connect
     :session (make-ement-session
               :user (make-ement-user :id id :username username)
               :server (make-ement-server :name server
                                          :uri-prefix uri-prefix)
               :token token
               :events (make-hash-table :test #'equal)
               :transaction-id 0))))

(defun sso-login (uri-prefix proc msg)
  (let* ((token (save-match-data
                  (string-match "GET /\\?loginToken=\\(.*\\)\s.*" msg)
                  (match-string 1 msg)))
         (login-data (ement-alist "type" "m.login.token"
                                  "token" token)))
    (ement-api (make-ement-session
                :server (make-ement-server :uri-prefix uri-prefix))
      "login"
      :then #'necronian-ement-sso-api
      :method 'post
      :data (json-encode login-data))
    (delete-process "ement-sso")))

(defun necronian-ement-sso (uri-prefix &optional local-port)
  (make-network-process
   :name "ement-sso"
   :family 'ipv4
   :host "localhost"
   :service (or local-port 4567)
   :filter (apply-partially #'sso-login uri-prefix)
   :server t)
  (browse-url (concat uri-prefix
                      "/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:"
                      (number-to-string (or local-port 4567)))))

Calling (necronian-ement-sso "<homeserver-url>") should open a browser and navigate to your sso page. Log in as you would usually and ement should log in to your server.

Necronian avatar Aug 15 '21 16:08 Necronian

Thanks, that is very helpful.

alphapapa avatar Aug 15 '21 19:08 alphapapa

This looks great! Does it have a chance of working through pantalaimon? My understanding is pantalaimon handles the login when I use it, as I don't inform ement of the home server pantalaimon is proxying to.

wehlutyk avatar Oct 16 '21 11:10 wehlutyk

This looks great! Does it have a chance of working through pantalaimon? My understanding is pantalaimon handles the login when I use it, as I don't inform ement of the home server pantalaimon is proxying to.

I have no idea, since I don't use Pantalaimon myself. If you could find out and report back, that would be helpful. :)

alphapapa avatar Mar 01 '22 09:03 alphapapa

Trying this with (necronian-ement-sso "https://one.element.io")

and after sign-in into browser, emacs fails with:

#<process firefox https://one.element.io/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4567>
Ement: Sync request sent, waiting for response...
Ement: Response arrived after 10.88 seconds.  Reading 2.5M JSON response...
Ement: Reading JSON took 0.85 seconds
Ement: Reading events...66% 
Ement: Sync request sent, waiting for response...
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error [59 times]
Ement: Response arrived after 30.22 seconds.  Reading 751 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: HTTP error [58 times]
Ement: Response arrived after 30.18 seconds.  Reading 751 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: HTTP error [30 times]
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update [2 times]
(...)

can you point me how to debug this error? ping: @Necronian

oneingan avatar Apr 17 '22 10:04 oneingan

Honestly, my elisp is not very good so I'm not sure if I can help.

To start this code will always be brittle since ement doesn't really have an interface for users to create/initialize a new session. We create the session struct ourselves and need to make sure we initialize it correctly with the information ement is expecting. That has changed slightly since my last post. This is what I'm using now, which I know fixes some issues.

(defun necronian-ement-sso-api (data)
  (let* ((id (cdr (assq 'user_id data)))
         (username (save-match-data
                     (string-match "@\\(.*\\):.*" id)
                     (match-string 1 id)))
         (server (cdr (assq 'home_server data)))
         (uri-prefix (cdr (assq 'base_url
                                (cdr (assq 'm\.homeserver
                                           (cdr (assq 'well_known data)))))))
         (token (cdr (assq 'access_token data))))
    (ement-connect
     :session (make-ement-session
               :user (make-ement-user :id id
                                      :username username
                                      :room-display-names (make-hash-table))
               :server (make-ement-server :name server
                                          :uri-prefix uri-prefix)
               :token token
               :events (make-hash-table :test #'equal)
               :transaction-id (ement--initial-transaction-id)))))

(defun sso-login (uri-prefix proc msg)
  (let* ((token (save-match-data
                  (string-match "GET /\\?loginToken=\\(.*\\)\s.*" msg)
                  (match-string 1 msg)))
         (login-data (ement-alist "type" "m.login.token"
                                  "token" token)))
    (ement-api (make-ement-session
                :server (make-ement-server :uri-prefix uri-prefix))
      "login"
      :then #'necronian-ement-sso-api
      :method 'post
      :data (json-encode login-data))
    (delete-process "ement-sso")))

(defun necronian-ement-sso (uri-prefix &optional local-port)
  (make-network-process
   :name "ement-sso"
   :family 'ipv4
   :host "localhost"
   :service (or local-port 4567)
   :filter (apply-partially #'sso-login uri-prefix)
   :server t)
  (browse-url (concat uri-prefix
                      "/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:"
                      (number-to-string (or local-port 4567)))))

Necronian avatar Apr 17 '22 11:04 Necronian

Thank you so much for your fast reply. Sadly your updated SSO code is not working for me neither. At least I expect to revive this thread and some elisp expert could help in the future. I'll keep trying.

oneingan avatar Apr 17 '22 19:04 oneingan

Juanjo, please be specific about what you did and what happened. Just saying that it didn't work isn't helpful.

On Sun, Apr 17, 2022, 14:25 Juanjo Presa @.***> wrote:

Thank you so much for your fast reply. Sadly your updated SSO code is not working for me neither. At least I expect to revive this thread and some elisp expert could help in the future. I'll keep trying.

— Reply to this email directly, view it on GitHub https://github.com/alphapapa/ement.el/issues/24#issuecomment-1100936291, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES2FK3JH3VX2FG3PZGNLDVFRQTVANCNFSM5CCSEWJQ . You are receiving this because you were assigned.Message ID: @.***>

alphapapa avatar Apr 19 '22 10:04 alphapapa

Sure, I run (necronian-ement-sso "https://one.element.io") again with new excerpt of code shared by @Necronian and after login in browser I get same message error than before:

error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: HTTP error [30 times]

By the way I'll be happy to help debugging this in-depth.

oneingan avatar Apr 19 '22 10:04 oneingan

If you're going to evaluate that expression directly, you will need to (require 'ement) first, otherwise the other libraries will not get loaded automatically.

On Tue, Apr 19, 2022, 05:42 Juanjo Presa @.***> wrote:

Sure, I run (necronian-ement-sso "https://one.element.io") again with new excerpt of code shared by @Necronian https://github.com/Necronian and after login in browser I get same message error than before:

error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: HTTP error [30 times]

— Reply to this email directly, view it on GitHub https://github.com/alphapapa/ement.el/issues/24#issuecomment-1102491607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES2FMVDU4XZGQSWYTRY63VF2EZVANCNFSM5CCSEWJQ . You are receiving this because you were assigned.Message ID: @.***>

alphapapa avatar Apr 19 '22 12:04 alphapapa

OK, I will try to be more clear. Reproducing the problem in a pristine emacs environment emacs -Q. I evaluate this code:

(add-to-list 'load-path "/home/user/.emacs.d/contrib-lisp/ement")
(add-to-list 'load-path "/home/user/.emacs.d/contrib-lisp/plz")
(require 'ement)

(defun necronian-ement-sso-api (data)
  (let* ((id (cdr (assq 'user_id data)))
         (username (save-match-data
                     (string-match "@\\(.*\\):.*" id)
                     (match-string 1 id)))
         (server (cdr (assq 'home_server data)))
         (uri-prefix (cdr (assq 'base_url
                                (cdr (assq 'm\.homeserver
                                           (cdr (assq 'well_known data)))))))
         (token (cdr (assq 'access_token data))))
    (ement-connect
     :session (make-ement-session
               :user (make-ement-user :id id
                                      :username username
                                      :room-display-names (make-hash-table))
               :server (make-ement-server :name server
                                          :uri-prefix uri-prefix)
               :token token
               :events (make-hash-table :test #'equal)
               :transaction-id (ement--initial-transaction-id)))))

(defun sso-login (uri-prefix proc msg)
  (let* ((token (save-match-data
                  (string-match "GET /\\?loginToken=\\(.*\\)\s.*" msg)
                  (match-string 1 msg)))
         (login-data (ement-alist "type" "m.login.token"
                                  "token" token)))
    (ement-api (make-ement-session
                :server (make-ement-server :uri-prefix uri-prefix))
      "login"
      :then #'necronian-ement-sso-api
      :method 'post
      :data (json-encode login-data))
    (delete-process "ement-sso")))

(defun necronian-ement-sso (uri-prefix &optional local-port)
  (make-network-process
   :name "ement-sso"
   :family 'ipv4
   :host "localhost"
   :service (or local-port 4567)
   :filter (apply-partially #'sso-login uri-prefix)
   :server t)
  (browse-url (concat uri-prefix
                      "/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:"
                      (number-to-string (or local-port 4567)))))

being ~/.emacs.d/contrib-lisp/ement and ~/.emacs.d/contrib-lisp/plz the place where i download git third party packages.

Then i run (necronian-ement-sso "https://one.element.io"), firefox new tab opens and I login in ElementOne site authorizing localhost. Browser hangs and Emacs Messages buffers prints:

#<process firefox https://one.element.io/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4567>
Ement: Sync request sent, waiting for response...
Ement: Response arrived after 11.87 seconds.  Reading 2.6M JSON response...
Ement: Reading JSON took 0.84 seconds
Ement: Reading events...62% 
Ement: Sync request sent, waiting for response...
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error
error in process sentinel: let: HTTP error
error in process sentinel: HTTP error [57 times]
Ement: Response arrived after 30.27 seconds.  Reading 751 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: HTTP error [60 times]
Ement: Response arrived after 30.41 seconds.  Reading 751 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: HTTP error [4 times]
error in process sentinel: Quit [8 times]
error in process sentinel: HTTP error [4 times]
error in process sentinel: Quit [2 times]
error in process sentinel: HTTP error [6 times]
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update [2 times]
Ement: Response arrived after 30.21 seconds.  Reading 751 JSON response...
Ement: Reading JSON took 0.00 seconds
Ement: Reading events... 
Ement: Sync request sent, waiting for response...
error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update
error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update

I'm running "GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)"

oneingan avatar Apr 19 '22 20:04 oneingan

Please install plz and ement according to the instructions in the readme.

On Tue, Apr 19, 2022, 15:57 Juanjo Presa @.***> wrote:

OK, I will try to be more clear. Also going to reproduce the problem in a pristine emacs environment, so i run emacs -Q then evaluate this code:

(add-to-list 'load-path "/home/user/.emacs.d/contrib-lisp/ement")

(add-to-list 'load-path "/home/user/.emacs.d/contrib-lisp/plz")

(require 'ement)

(defun necronian-ement-sso-api (data)

(let* ((id (cdr (assq 'user_id data)))

     (username (save-match-data

                 (string-match "@\\(.*\\):.*" id)

                 (match-string 1 id)))

     (server (cdr (assq 'home_server data)))

     (uri-prefix (cdr (assq 'base_url

                            (cdr (assq 'm\.homeserver

                                       (cdr (assq 'well_known data)))))))

     (token (cdr (assq 'access_token data))))

(ement-connect

 :session (make-ement-session

           :user (make-ement-user :id id

                                  :username username

                                  :room-display-names (make-hash-table))

           :server (make-ement-server :name server

                                      :uri-prefix uri-prefix)

           :token token

           :events (make-hash-table :test #'equal)

           :transaction-id (ement--initial-transaction-id)))))

(defun sso-login (uri-prefix proc msg)

(let* ((token (save-match-data

              (string-match "GET /\\?loginToken=\\(.*\\)\s.*" msg)

              (match-string 1 msg)))

     (login-data (ement-alist "type" "m.login.token"

                              "token" token)))

(ement-api (make-ement-session

            :server (make-ement-server :uri-prefix uri-prefix))

  "login"

  :then #'necronian-ement-sso-api

  :method 'post

  :data (json-encode login-data))

(delete-process "ement-sso")))

(defun necronian-ement-sso (uri-prefix &optional local-port)

(make-network-process

:name "ement-sso"

:family 'ipv4

:host "localhost"

:service (or local-port 4567)

:filter (apply-partially #'sso-login uri-prefix)

:server t)

(browse-url (concat uri-prefix

                  "/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:"

                  (number-to-string (or local-port 4567)))))

being ~/.emacs.d/contrib-lisp/ement and ~/.emacs.d/contrib-lisp/plz the place where i download git third party packages.

Then i run (necronian-ement-sso "https://one.element.io"), firefox new tab opens and I login in ElementOne site authorizing localhost. Browser hangs and Emacs Messages buffers respond:

#<process firefox https://one.element.io/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4567>

Ement: Sync request sent, waiting for response...

Ement: Response arrived after 11.87 seconds. Reading 2.6M JSON response...

Ement: Reading JSON took 0.84 seconds

Ement: Reading events...62%

Ement: Sync request sent, waiting for response...

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error

error in process sentinel: let: HTTP error

error in process sentinel: HTTP error [57 times]

Ement: Response arrived after 30.27 seconds. Reading 751 JSON response...

Ement: Reading JSON took 0.00 seconds

Ement: Reading events...

Ement: Sync request sent, waiting for response...

error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: HTTP error [60 times]

Ement: Response arrived after 30.41 seconds. Reading 751 JSON response...

Ement: Reading JSON took 0.00 seconds

Ement: Reading events...

Ement: Sync request sent, waiting for response...

error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: HTTP error [4 times]

error in process sentinel: Quit [8 times]

error in process sentinel: HTTP error [4 times]

error in process sentinel: Quit [2 times]

error in process sentinel: HTTP error [6 times]

error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update [2 times]

Ement: Response arrived after 30.21 seconds. Reading 751 JSON response...

Ement: Reading JSON took 0.00 seconds

Ement: Reading events...

Ement: Sync request sent, waiting for response...

error in process sentinel: run-hook-with-args: Symbol’s function definition is void: ement-room-list-auto-update

error in process sentinel: Symbol’s function definition is void: ement-room-list-auto-update

I'm running "GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)"

— Reply to this email directly, view it on GitHub https://github.com/alphapapa/ement.el/issues/24#issuecomment-1103161345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES2FJZQ6BEZXKPSD4OIJTVF4M25ANCNFSM5CCSEWJQ . You are receiving this because you were assigned.Message ID: @.***>

alphapapa avatar Apr 20 '22 03:04 alphapapa

Ok, I evaluate this now and its working well:

(unless (package-installed-p 'quelpa)
  (with-temp-buffer
    (url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el")
    (eval-buffer)
    (quelpa-self-upgrade)))

(quelpa
 '(quelpa-use-package
   :fetcher git
\   :url "https://github.com/quelpa/quelpa-use-package.git"))
(require 'quelpa-use-package)

;; Install `plz' HTTP library (not on MELPA yet).
(use-package plz
  :quelpa (plz :fetcher github :repo "alphapapa/plz.el"))

;; Install Ement.
(use-package ement
	     :quelpa (ement :fetcher github :repo "alphapapa/ement.el"))
(require 'ement)

(defun necronian-ement-sso-api (data)
  (let* ((id (cdr (assq 'user_id data)))
         (username (save-match-data
                     (string-match "@\\(.*\\):.*" id)
                     (match-string 1 id)))
         (server (cdr (assq 'home_server data)))
         (uri-prefix (cdr (assq 'base_url
                                (cdr (assq 'm\.homeserver
                                           (cdr (assq 'well_known data)))))))
         (token (cdr (assq 'access_token data))))
    (ement-connect
     :session (make-ement-session
               :user (make-ement-user :id id
                                      :username username
                                      :room-display-names (make-hash-table))
               :server (make-ement-server :name server
                                          :uri-prefix uri-prefix)
               :token token
               :events (make-hash-table :test #'equal)
               :transaction-id (ement--initial-transaction-id)))))

(defun sso-login (uri-prefix proc msg)
  (let* ((token (save-match-data
                  (string-match "GET /\\?loginToken=\\(.*\\)\s.*" msg)
                  (match-string 1 msg)))
         (login-data (ement-alist "type" "m.login.token"
                                  "token" token)))
    (ement-api (make-ement-session
                :server (make-ement-server :uri-prefix uri-prefix))
      "login"
      :then #'necronian-ement-sso-api
      :method 'post
      :data (json-encode login-data))
    (delete-process "ement-sso")))

(defun necronian-ement-sso (uri-prefix &optional local-port)
  (make-network-process
   :name "ement-sso"
   :family 'ipv4
   :host "localhost"
   :service (or local-port 4567)
   :filter (apply-partially #'sso-login uri-prefix)
   :server t)
  (browse-url (concat uri-prefix
                      "/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:"
                      (number-to-string (or local-port 4567)))))

Thanks everyone for your effort.

oneingan avatar Apr 20 '22 12:04 oneingan

@uningan Thanks, that's great.

@Necronian It looks like your code works. I'd guess it's sufficiently trivial (i.e. there's no other obvious way to implement it) that copyright could hardly be an issue, but on the other hand, the FSF's policies are what they are (i.e. no more than 15 lines of changes without copyright assignment. Since I'm planning to submit Ement to GNU ELPA, which requires FSF CA, are you willing to pursue that, so this code could be accepted as-is in a patch?

alphapapa avatar Apr 21 '22 18:04 alphapapa

I'll try to get a FSF CA. Honestly it feels a bit silly for something so trivial, but sure.

I've always wanted to eventually integrate it into ement-connect. Possibly when a blank password is entered and m.login.sso is supported start the sso process.

What I have now has been working so I just haven't felt a huge need.

Necronian avatar Apr 23 '22 09:04 Necronian

I'll try to get a FSF CA. Honestly it feels a bit silly for something so trivial, but sure.

Thanks. I'm trying to go by the book here so that there won't be any troubles in the future (which are always much harder to resolve after the fact).

I've always wanted to eventually integrate it into ement-connect. Possibly when a blank password is entered and m.login.sso is supported start the sso process.

Probably we'll need to check the server's supported methods and prompt the user for the one to use.

alphapapa avatar Apr 29 '22 19:04 alphapapa

Not working for me again, any hints?

#<process firefox https://one.element.io/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4567>
error in process sentinel: cond: Keyword argument :room-display-names not one of (:id :displayname :account-data :color :message-color :username :avatar-url :avatar)
error in process sentinel: Keyword argument :room-display-names not one of (:id :displayname :account-data :color :message-color :username :avatar-url :avatar)

stil ok on you @Necronian ?

oneingan avatar Jun 02 '22 10:06 oneingan

Not working for me again, any hints?

#<process firefox https://one.element.io/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4567>
error in process sentinel: cond: Keyword argument :room-display-names not one of (:id :displayname :account-data :color :message-color :username :avatar-url :avatar)
error in process sentinel: Keyword argument :room-display-names not one of (:id :displayname :account-data :color :message-color :username :avatar-url :avatar)

stil ok on you @Necronian ?

That code does not exist in Ement.el anymore. You need to remove the setting of the :room-display-names argument in his code.

alphapapa avatar Jun 02 '22 12:06 alphapapa

Every time emacs is restarted, ement.el needs relogin to use. Is this related with SSO?

h0cheung avatar Jul 06 '22 12:07 h0cheung

Every time emacs is restarted, ement.el needs relogin to use. Is this related with SSO?

Are you using SSO?

alphapapa avatar Jul 07 '22 12:07 alphapapa

Every time emacs is restarted, ement.el needs relogin to use. Is this related with SSO?

Are you using SSO?

Yes

h0cheung avatar Jul 16 '22 09:07 h0cheung

@h0cheung Have you enabled ement-save-sessions?

alphapapa avatar Jul 16 '22 12:07 alphapapa

@alphapapa No. This is likely the problem.

h0cheung avatar Jul 17 '22 02:07 h0cheung

@necronian: Have you gotten the FSF CA done yet? I'd like to merge this code so it can be more widely tested.

alphapapa avatar Sep 19 '22 20:09 alphapapa

I did re-start the process last week after I replied to your matrix message. I have not hear a response yet but I will try to keep you posted on the progress.

Necronian avatar Oct 01 '22 10:10 Necronian

@Necronian Thanks. I was also able to get an account on a server that uses SSO, so I should be able to develop this feature myself when I have time.

alphapapa avatar Oct 01 '22 13:10 alphapapa

@alphapapa may I ask whether you've made any progress with this? Would love to be using ement!

spwhitton avatar Feb 25 '23 16:02 spwhitton

@spwhitton No, I haven't had time to work on this lately, but I don't mind your reminding me about it, since it's not a feature I currently need and think about often.

@Necronian

I'll try to get a FSF CA. Honestly it feels a bit silly for something so trivial, but sure.

Did you get the FSF CA done? That could simplify this process a bit for me.

alphapapa avatar Mar 01 '23 04:03 alphapapa

I just wanted to confirm that the patch works, I was able to connect to both the Fedora matrix server and our internal company server. For any Fedora users, it's as easy as

(necronian-ement-sso "https://chat.fedoraproject.org")

This is IMHO the most important RFE right now, so thank you @Necronian for implementing it. Really looking forward to getting this merged.

FrostyX avatar Mar 17 '23 12:03 FrostyX