fix frontend error
This commit is contained in:
@@ -629,11 +629,12 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
|
||||
const applyLoginAuth = React.useCallback(
|
||||
async (auth: Omit<AuthTokens, 'user'> & { user?: PublicUser }) => {
|
||||
if (auth.pinVerified) {
|
||||
if (!auth.user) {
|
||||
const authenticatedUser = auth.user;
|
||||
if (!authenticatedUser) {
|
||||
const user = await fetchAuthSession(auth.accessToken).then((session) => session.user);
|
||||
await establishSession({ ...auth, user });
|
||||
} else {
|
||||
await establishSession(auth);
|
||||
await establishSession({ ...auth, user: authenticatedUser });
|
||||
}
|
||||
} else {
|
||||
persistPartialAuth(auth);
|
||||
|
||||
Reference in New Issue
Block a user