Add option to force authentication by RowanErasmus · Pull Request #2861 · OHDSI/Atlas (original) (raw)
This is half related to these two issues:
##2857
#OHDSI/WebAPI#2268
The idea is to automatically log in to Atlas when a user is already authenticated with SSO.
To this end I have added a configuration userAuthenticationForced (better suggestions are welcome)
If this is enabled and a user is not logged in it will open the sign in modal, if there is only one auth provider it will trigger that one. As a result if a session is already established with your provider it will just log you in without any clicks.
If you have multiple outlook accounts and are using Azure AD it plays nicely with #OHDSI/WebAPI#2254 to suggest which account it should be using
A video of what it looks like when not yet authenticated:
https://github.com/OHDSI/Atlas/assets/74538318/b1c93559-39a5-4602-b8a8-6858a0ef2ec9
If you have already have a session with your provider but not with Atlas it goes like so:
https://github.com/OHDSI/Atlas/assets/74538318/4595193d-a7f1-4809-adb4-e9d93a6479fd
It is not very 'smooth' and takes a couple of seconds but it's good enough for me :-)
(I've also fixed some indentation in the welcome.js file, although it still looks a bit weird in the pr...)