2

I was wondering if anyone knew how to logout of both the composer rest server and a client application when using authentication and multi user server?

Background:

I have a client application running on localhost:6001

I have my composer rest server running in a docker container on localhost:3000 that has google authentication and multi user enabled.

I am currently logging in to both by setting up my server with this article and having in the COMPOSER_PROVIDERS environment variable successRedirect='http://localhost:6001/auth/google' which will start the logic for logging into my app with google from this youtube series.

The issue is when I logout of my app using req.logout it logs out of my app, but not the composer rest server.

Does anyone know how to logout of both?

If I redirect to http://localhost:3000/auth/logout then that logs out of the server but I don't want my client be redirected there; I want them to be redirected to my login page and subsequently be logged out of the rest server.

Thanks!

  • see this [SO Thread](https://stackoverflow.com/questions/12909332/how-to-logout-of-an-application-where-i-used-oauth2-to-login-with-google} (look for the answers nearer the bottom). It also depends on what you want to do - ie. do you want to revoke the access token as well (as log out of the Google client auth session so they log in again to get another) – Paul O'Mahony Jul 24 '18 at 09:23
  • Hi Paul, thanks so much for replying. I tried the suggestions in the article you linked, mainly the continue in the url. After calling req.logout() to logout of my app, I had it redirect to http://localhost:3000/auth/logout?continue=http://localhost:6001/auth/login and it would redirect to logout of the server, but then automatically redirected to localhost:3000/explorer and never continued to my app on 6001. – Kat Hunsinger Jul 25 '18 at 01:38
  • Hi @KatHunsinger, Do you found the solution of this? – Pranjal Aug 29 '18 at 11:31
  • Hi @Pranjal, no I never did find one. I just ended up changing my archiceture to not include multi user for composer. Sorry! – Kat Hunsinger Aug 31 '18 at 00:00
  • How did you enable multiple user angular client if you are not using multi mode composer rest ?!! – appbootup Sep 16 '18 at 13:11
  • I filed a composer rest issue for this https://github.com/hyperledger/composer/issues/4387 – appbootup Sep 16 '18 at 14:17

0 Answers0