Merge branch 'main' into development

This commit is contained in:
John Wu
2021-03-29 13:30:55 -07:00
committed by GitHub

View File

@@ -79,6 +79,8 @@ export const UserProvider = ({ children }) => {
setError(`Verify error. ${e.message}`);
document.location = signOut();
}
return result;
};
const signIn = async (code) => {
@@ -87,6 +89,13 @@ export const UserProvider = ({ children }) => {
try {
if (!code) return;
const refresh = async (value) => {
let result = null;
try {
if (!value) {
throw new Error("Token required");
}
setFetching(true);
setError(null);