-
Notifications
You must be signed in to change notification settings - Fork 84
Allow logging in existing user in promotion flow #1470
Comments
I have question regarding the SDK. After the promotion, the user is authenticated as a normal user. When the user logs out and authenticateAnonymously again, is the anonymous user a brand new one? |
Yes, after finishing the promotion flow, the key ID is deleted and a new key is generated. |
ah, it makes a lot of sense. Will we have a default I think in our doc or config comment, we need to remind users that we won't MERGE the anonymous user for them, the application need to handles the merging behavior if they want to after login. |
If the default is Also we should turn off anonymous user by default as not every application needs it. |
@louischan-oursky the dilemma here is, is there any users who would prefer to have an error instead of able to login directly, if he "upgrade" the anonymous users to an existing logged in users? ..... |
Login directly as existing user would 'lose' the anonymous user, along with its associated data. If developer forgot to configure it and deployed to production, it can cause destructive data damage. Therefore, |
@kiootic I understand what @louischan-oursky said, actually I've already spell out we should add a warning in the documentation about "merging users" before all these already. I'm just pointing out no normal people would expect, say after clicking "Continue as guest", if you choose "Login", it said "Users existed" when he tried to login an existing user account. This would definitely look like a bug. So the safer default is also a non-sense default from user's POV. |
Some ideas of how we might provide a better experience: Idea One: Explicit error messageIf I'm right that no normal users would expect the And in the default error message, we can make it clear that it is not configured, something like: "Guest users can't promote to an existing user, please read the configuration of Idea Two: Explicit auth UIAt the promotion screen, we default show a sign up UI (like now), with another link to "Login with account" And instead, we have a configuration to disable and merge the signup / login UI at promotion screen I feel like idea two is better (more smooth, so the default options make a clear distinguishment, while the configuration provide a smoother experience if the developers know what they're doing. Any other idea? |
Re-open issue to consider if there is better way to solve the problem |
From the end user's perspective, just like what Ben said, the user normally does not expect the
From the developer's perspective, they are very likely unaware of the merge case. So the default configuration should not cause destructive data damage. The main problem becomes how to make the developer aware of it. If the default is Actually I want to merge the signup, login and promotion page into one. The End-User has fewer things to choose. Instead the UI tells the End-User what is happening and guide them to finish the flow. So I prefer Idea 1. |
Discussed with @louischan-oursky @kiootic off line, agreed Idea 1 is better, maybe we can use an explicit error message like "You can't continue as guest by loggin in an existing user account". |
User may select an existing identity in promotion flow. Currently, it would fail with an identity exists error. Use case instead requires user to perform authentication and log in using the existing identity. The anonymous user is discarded in this case.
on_identity_conflict.promotion
error
login
before_user_promote
,after_user_promote
anonymous_user
user
anonymous_user
anduser
have same IDon_identity_conflict.promotion
islogin
,anonymous_user
anduser
may have different ID.ref #1469
The text was updated successfully, but these errors were encountered: