element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Onboarding experience with SSO

Open gabrc52 opened this issue 2 years ago • 9 comments

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

gabrc52 avatar Aug 22 '23 02:08 gabrc52

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.

t3chguy avatar Aug 22 '23 06:08 t3chguy

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.

weeman1337 avatar Aug 22 '23 08:08 weeman1337

This is becoming important because it also affects OIDC-native logins

sandhose avatar Sep 21 '24 09:09 sandhose

image

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.

t3chguy avatar Oct 08 '24 11:10 t3chguy

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".

pmaier1 avatar Oct 08 '24 11:10 pmaier1

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.

t3chguy avatar Oct 08 '24 11:10 t3chguy

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 avatar Oct 08 '24 11:10 pmaier1

@pmaier1 sounds good, there is currently no dismiss interaction, could you suggest who can be tasked with designing such?

image

t3chguy avatar Oct 08 '24 16:10 t3chguy

@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 avatar Oct 14 '24 08:10 pmaier1

@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 avatar Oct 31 '24 19:10 MuhammadHadiofficial

@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

t3chguy avatar Nov 04 '24 18:11 t3chguy

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.

pmaier1 avatar Jan 14 '25 13:01 pmaier1