Introduce createSIWEAccount(...) and use in siweAuthResponder to create an account for an address if it doesn't already exist.
Depends on D6076
Differential D6077
[keyserver] Introduce `createSIWEAccount` and use in `siweAuthResponder` atul on Dec 28 2022, 5:31 PM. Authored by Tags None Referenced Files
Subscribers None
Details Introduce createSIWEAccount(...) and use in siweAuthResponder to create an account for an address if it doesn't already exist. NOTE: This differs with how we do things currently for "password login" where the register and login endpoints both send back SUCCESS payloads with the necessary data to "log the user in" on the client. For SIWE the createSIWEAccount will only do account creation if necessary and will leave fetching to processSuccessfulLogin which will construct the SUCCESS payload (LogInResponse) and send it back to the client. This simplifies things on the client because we only have to handle one type of response from the siwe_auth endpoint. We should just be able to add | action.type === siweAuthActionTypes.success to all the reducers on the client where we check logInActionTypes.success and we should be good to go. Please let me know if there's somethign I'm missing that requires us to send back separate payloads for registration/login.
Depends on D6076 Will do thorough testing after I've put up rest of the stack + before landing.
Diff Detail
Event Timeline
Comment Actions Accepting with comment
|