This commit is contained in:
seb
2026-08-05 08:19:13 +02:00
parent 3000d7d45c
commit a9e942df7a
8 changed files with 417 additions and 155 deletions

View File

@@ -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', {