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) return auth.signUp(username, password)
.then((result) => { .then((result) => {
if (result.message) throw new Error(result.message); if (result.message) throw new Error(result.message);
return signIn(username, password);
}) })
.catch((error) => { .catch((error) => {
setError(error.message); setError(error.message);