Issue with Next.js, Cookies from next/headers, and ApolloError
Unanswered
Little Stint posted this in #help-forum
Little StintOP
I created a sign in logic where once I sign in, I set a refresh token into cookies storage at my model file . ( I am using cookies from next/headers, and my model is mongoose).
When I log out and try to sign in again I get the error above. For more clarity the error below.
I have provided images with the following fuctions as follows:
From my model function is
UserSchema.methods.getSignedInToken()
My resolver function
Login()
And my onSubmit() function at the client
Please I need help on this. I hope I structured my question right.
When I log out and try to sign in again I get the error above. For more clarity the error below.
formik.esm.js:937 Warning: An unhandled error was caught from submitForm() ApolloError: Invariant: cookies() expects to have requestAsyncStorage, none available.I have provided images with the following fuctions as follows:
From my model function is
UserSchema.methods.getSignedInToken()
My resolver function
Login()
And my onSubmit() function at the client
Please I need help on this. I hope I structured my question right.