Onboarding experience with SSO
Your use case
What would you like to do?
Element has a pretty nice onboarding screen but it only works when signing up via password. It would be nice to be able to do this with SSO too.
Why would you like to do it?
To set up an organization Matrix server and have Element encourage people to install mobile apps, enable notifications, etc.
How would you like to achieve it?
By having a config.json option to enable the onboarding experience when logging in for the first time when using single-sign on. Element can know the account is brand new if it's missing account data from it. It would also be nice to be able to specify an option from the coworkers vs friends question, i.e. have it say "talk with your classmates" without people having to choose they'll use it for work.
Have you considered any alternatives?
It may be already possible somehow by using templates and adding template code for welcome.html.
Additional context
No response
Element can know the account is brand new if it's missing account data from it
Not really? Existing users who haven't gone through the onboarding flow would be met with it, e.g. existing SSO users merely signing in again, or users who registered on a Element android/ios or non-Element client.
May this be a different issue then? Something like „Onboarding on first Element Web login“? We could store something in the account data to find out. Input from product is required here anyway in my opinion.
This is becoming important because it also affects OIDC-native logins
So currently the logic is to only show it to users where we know their registration time, which is something we know if the registration happened within the local client and SSO always counts as login. Would need Product to confirm how they would like this to work in an SSO world.
Well, in the future with MAS, every login will be an "SSO-login", if I'm not mistaken. So we need to find a way to show the onboarding screens in that case as well.
What are the options? Why did we choose registration time? I could imagine to show it always and give the user the ability to say "don't show this again".
Why did we choose registration time?
Unfortunately your guess is as good as mine, everyone involved in that work & review is no longer around https://github.com/matrix-org/matrix-react-sdk/pull/9083
There is nothing in the Matrix API or SSO login that lets us differentiate a new account from an existing one, nor any way to get registration time for an account.
There is nothing in the Matrix API or SSO login that lets us differentiate a new account from an existing one, nor any way to get registration time for an account.
Ok, got it. What about showing it always and storing permanent dismiss in the account data or so? Let's discuss other options in a meeting if it isn't that easy.
@pmaier1 sounds good, there is currently no dismiss interaction, could you suggest who can be tasked with designing such?
@pmaier1 sounds good, there is currently no dismiss interaction, could you suggest who can be tasked with designing such?
:+1: who can help here @daniellekirkwood @amshakal ?
@pmaier1 Synapse does flag new SSO logins and register new SSO_IDS as new accounts before mapping users and redirecting back to client. We can pass information along with loginToken in URL for registration time or simply just pass newUser field in queryparam with loginToken and fetch those in attemptTokenLogin and start onboarding based on that? This would be more of a synapse server solution before anything being done on client.
Just quick thoughts as I was also wondering the onboarding didn't work with SSO.
@MuhammadHadiofficial that'd need spec work as loginToken is the only specced param atm https://spec.matrix.org/v1.12/client-server-api/#client-login-via-sso
It was decided to drop the onboarding flow for now due to the issue described in here and improvements that would need to be made to it. We intend to come back to it later and design a cross-platform unified onboarding experience together with Element X on mobile. Closing here.