u
This commit is contained in:
@@ -6,6 +6,7 @@ import GoogleIcon from '@mui/icons-material/Google';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import { notifyErrorMessage } from '../utils/notify';
|
||||
import { loginWithGoogle, selectAuthStatus, selectGoogleClientId } from '../store/authSlice';
|
||||
import { StorageManagerContext } from '../api/storageManager';
|
||||
import {
|
||||
abortGoogleSignIn,
|
||||
FEDCM_BLOCKED_MESSAGE,
|
||||
@@ -16,6 +17,8 @@ import {
|
||||
} from '../auth/googleSignIn';
|
||||
|
||||
class LoginPage extends Component {
|
||||
static contextType = StorageManagerContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { busy: false };
|
||||
@@ -36,6 +39,7 @@ class LoginPage extends Component {
|
||||
});
|
||||
this.setState({ busy: true });
|
||||
await this.props.loginWithGoogle(idToken).unwrap();
|
||||
await this.context.updateAuthMe();
|
||||
} catch (err) {
|
||||
if (err instanceof GoogleSignInCancelledError) return;
|
||||
logError('[login] Google sign-in failed', {
|
||||
|
||||
Reference in New Issue
Block a user