EmailAlreadyInUse
error.
For example: if the user created their account using Google Sign In and then attempts to sign in with Email + OTP using the same method, they will receive this error.
By default (if using the default SequenceLoginWindow
), the SDK will automatically open the FederatedAuthPopupPanel
prefab located at SequenceFrontend > Prefabs > FederatedAuthPopupPanel
. This prefab can be customized to your linking or replaced in the SequenceLoginWindow prefab. This panel will explain to the user that duplicate login methods are not allowed and prompt them to return to the login screen and sign in with their associated login method (or a different email altogether).
If
EnableMultipleAccountsPerEmail
is enabled in SequenceConfig
the FederatedAuthPopupPanel
will give the user the option to create another account associated with their email.FederateAccount
request (see SequenceLogin
). This will associate the failed login method with that email as well so that the user may sign in with either in the future. Using our example above, the user would now be able to sign into their account using Google Sign In or Email + OTP.
Manually Federating Accounts
You may want to add a button to your app allowing the user to associate an additional login method with their email (especially if you are using Guest Login). You’ll want get a reference toSequenceLogin
and then call the appropriate FederateAccount
method for the login method.
SequenceWallet
you retrieved after authenticating the user.
Re-using the Login Window Boilerplate
To allow a user to federate/link their accounts manually using the default LoginPanel, simply callSetConnectedWalletAddress
on your SequenceLogin
instance or call SequenceLogin.GetInstanceToFederateAuth
with the currently authenticated wallet address provided.
Once the user has logged out, don’t forget to call
RemoveConnectedWalletAddress()
to re-configure SequenceLogin to create new sessions again.Removing Federated Accounts
If you ever want to remove a federated account association, this can be done with theIWallet.RemoveFederatedAccount
method.