wekan icon indicating copy to clipboard operation
wekan copied to clipboard

OAUTH2_LOGIN_STYLE=redirect Has No Effect

Open 1ubuntuuser opened this issue 4 years ago • 13 comments

Issue

#3542 Issue mentioned here also, but I think it's not the focus of the conversation. Other Wekan issues can be added here.

Server Setup Information:wekan + keycloak

  • Note: Please anonymize info, and do not add to this public issue any of your Wekan board URLs, passwords, API tokens etc, do you understand?:Yes

  • Did you test in newest Wekan?: Yes

  • Wekan version: Latest

  • Operating System: Ubuntu

  • Deployment Method(snap/docker/sandstorm/mongodb bundle/source): Docker

  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): nginx

  • Node Version:

  • MongoDB Version:

  • Wekan only works on newest desktop Firefox/Chromium/Chrome/Edge/Chromium Edge and mobile Chrome. What webbrowser version are you using?

Problem description: When setting "OAUTH2_LOGIN_STYLE=redirect" in the docker-compose.yml file it has no effect and a popup window is shown, even when you need a redirect instead.

  • REQUIRED: Add recorded animated gif about how it works currently, and screenshot mockups how it should work. Use peek to record animgif in Linux https://github.com/phw/peek
  • Explain steps how to reproduce Enable Oauth2 > set OAUTH2_LOGIN_STYLE=redirect > attampt to login and see popup instead of redirect.

I can confirm the wrong parameter is being passed to the oauth by looking at the pop up window url ".../protocol/openid-connect/auth?loginStyle=popup&client_id=webapp-wekan&response_type..."

The reason this is important is I'm automating the login steps with JavaScript. Unfortunately most browsers block popups initiated by JS so I need to use redirect instead! Thanks!

  • If using Snap, what does show command sudo snap logs wekan.wekan ? Please anonymize logs.
  • If using Docker, what does show command sudo docker logs wekan-app ? Please anonymize logs.
  • If logs are very long, attach them in .zip file

1ubuntuuser avatar Jun 08 '21 06:06 1ubuntuuser

@xet7 I'll test that out thanks!

1ubuntuuser avatar Jun 09 '21 01:06 1ubuntuuser

@xet7 This will have to be reopened. v5.35 Still has the same behavior. Popup has url with "...auth?loginStyle=popup&clie..."

Had a look at the code. Seems like the else conditions aren't being. The popup is 320x449 so I assume the popup code is running.

      width:  options.popupOptions.width || 320,
      height: options.popupOptions.height || 450

1ubuntuuser avatar Jun 15 '21 02:06 1ubuntuuser

That previous trying to fix broke Google login, so I had to revert it in Wekan 5.34.

In reverting commit I tried to open this issue, but it seems GitHub did not open it:

https://github.com/wekan/wekan/commit/1e837dec11dc5cb266b83efcff4f462aa02d733d

xet7 avatar Jun 15 '21 07:06 xet7

thanks @xet7 I tested out 5.33. Seems some code has run as the popup screen has been altered, but it is still a popup. URL still contains "loginStyle=popup"

https://user-images.githubusercontent.com/17303371/122485854-3d88c500-d01b-11eb-8ba4-f75d3dc64c73.mp4

1ubuntuuser avatar Jun 17 '21 23:06 1ubuntuuser

Same here, looking forward for a fix.

varac avatar Jul 29 '21 23:07 varac

@xet7 do you know why it conflicts with google?

1ubuntuuser avatar Nov 01 '21 23:11 1ubuntuuser

Is there anyone who is using wekan with google auth who could test / look into why https://github.com/wekan/wekan/commit/78324263c1c78e7e9e99f153e3158e39f564b67a broke it ?

varac avatar Dec 16 '21 10:12 varac

@varac

Redirect has never worked. There could be some bug at wekan/packages/*oidc*/*

xet7 avatar Dec 16 '21 10:12 xet7

Please, is the popup style working? How can I configure this method?

flaviohrocha avatar Feb 11 '22 14:02 flaviohrocha

@flaviohrocha

Google login does work: https://github.com/wekan/wekan/wiki/Google-login

Also others should work.

xet7 avatar Feb 11 '22 14:02 xet7

It's just that when logging in, it's enough that popup login style works.

Having popup vs redirect is just about what is visible for some seconds, it's not any kind of critical.

xet7 avatar Feb 11 '22 14:02 xet7

The distinction is important to us though, because our testing framework (cypress) consciously doesn't support separate windows, so we can't properly test our wekan instance if it doesn't respect the "redirect" directive.

ariep avatar Aug 04 '22 13:08 ariep

@ariep

Does this autologin feature help with that?

https://github.com/wekan/wekan/blob/master/CHANGELOG.md#v630-2022-07-11-wekan--release

xet7 avatar Aug 04 '22 21:08 xet7

It also breaks iPhone usage for me as Popup gets blocked in safari per default.

ykorzikowski avatar Nov 14 '22 15:11 ykorzikowski

@xet7 yes it helps

ykorzikowski avatar Dec 05 '22 08:12 ykorzikowski