Olamide
Olamide
CCConvex Community
Created by NlaakALD on 10/4/2024 in #support-community
Server show signed in & refreshed token, yet, <Unauthenticated> is triggered
I just use concurrently and run the dev server and convex running at the same time
24 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
It just doesn't make sense cause why do I need to hard reload for it to work?
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
Sign in also has the same issue but once I reload and change the url to dashboard it gets that they are authenticated
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
const navigate = Route.useNavigate();
const { signIn } = useAuthActions();
const [error, setError] = useState<string | null>(null);
const [isSigningUp, setIsSigningUp] = useState(false);
const { control, handleSubmit } = useForm<SignUpFormData>({
resolver: zodResolver(signUpSchema),
defaultValues: {
name: '',
email: '',
password: '',
role: undefined,
},
});

const onSubmit = async (data: SignUpFormData) => {
setError(null);
setIsSigningUp(true);
console.log(data);
signIn('password', { ...data, isOnboardingComplete: false, flow: 'signUp' })
.then(() => {
console.log('Sign-up successful');
toast.success('Sign up successful. You can now start onboarding!');
navigate({
to: '/dashboard',
});
})
.catch((error) => {
setError('Sign-up failed. Please try again.');
console.error('Sign-up failed:', error);
})
.finally(() => {
setIsSigningUp(false);
});
};
const navigate = Route.useNavigate();
const { signIn } = useAuthActions();
const [error, setError] = useState<string | null>(null);
const [isSigningUp, setIsSigningUp] = useState(false);
const { control, handleSubmit } = useForm<SignUpFormData>({
resolver: zodResolver(signUpSchema),
defaultValues: {
name: '',
email: '',
password: '',
role: undefined,
},
});

const onSubmit = async (data: SignUpFormData) => {
setError(null);
setIsSigningUp(true);
console.log(data);
signIn('password', { ...data, isOnboardingComplete: false, flow: 'signUp' })
.then(() => {
console.log('Sign-up successful');
toast.success('Sign up successful. You can now start onboarding!');
navigate({
to: '/dashboard',
});
})
.catch((error) => {
setError('Sign-up failed. Please try again.');
console.error('Sign-up failed:', error);
})
.finally(() => {
setIsSigningUp(false);
});
};
This is the logic in the component the rest are just jsx
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
Yeah I have just one ConvexAuthProvider wrapping the entire app
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
I would share that now The thing is something isAuthenticated is false and sometimes after sign up isAuthenticated is true there is inconsistency
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
After signing up isAuthenticated is false and isLoading is also false
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
No description
15 replies
CCConvex Community
Created by djbalin on 8/27/2024 in #support-community
[Convex Auth]: signIn doesn't set isAuthenticated to true immediately
How were you able to solve it?
6 replies
CCConvex Community
Created by djbalin on 8/27/2024 in #support-community
[Convex Auth]: signIn doesn't set isAuthenticated to true immediately
I ran into the same issue this doesn't work also since after sign-in is authenticated is still false so it redirects immediately back to the sign in page
6 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
isAuthenticated should be true immediately I sign up right I logged it, it is false so it redirects me back to sign in isLoading is false while isAuthenticated also is still false
15 replies
CCConvex Community
Created by Olamide on 8/28/2024 in #support-community
Seems like convex auth isn't setting user immediately
It still doesn't fix it
15 replies