Sign up should also sign in

This commit is contained in:
jwu-fisker
2021-01-06 11:07:19 -08:00
parent 70c0714559
commit d7616ca577

View File

@@ -54,6 +54,7 @@ export const UserProvider = ({ children }) => {
return auth.signUp(username, password)
.then((result) => {
if (result.message) throw new Error(result.message);
return signIn(username, password);
})
.catch((error) => {
setError(error.message);