Sign up should also sign in
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user