parabol
parabol copied to clipboard
Prompt to join org does not work with SSO
- Now we require email to be verified to use prompt to join org
- For
loginWithSAMLwe don't createidentitiesarray, which we use to determine if email is verified - This cause a bug
Solutions:
- Quick solution is to use this workaround like we used for autojoin https://github.com/ParabolInc/parabol/pull/9189
- Good solution, add identities array https://github.com/ParabolInc/parabol/issues/9202
No, quick solution is not very good, we checking identities several times in nested prompt to join functions.
I propose the quickfix:
- change https://github.com/ParabolInc/parabol/blob/master/packages/server/utils/isUserVerified.ts to also check the login type
- use this function instead of manually checking the identities everywhere
We have many loops where isUserVerified is called. I'm worrying that it is async and it may accidentally cause a lot of queries. Let me check, I feel that the right way to fix it would be not much complex
I started with identities solution, but it feels more tricky, will link my draft PR and will do a quick one. #9420
This would be good for us to fix finish fixing up. I'll add it near the top of our queue
Also see #4125 as an alternative approach.