It's possible to use HF along with Next-Auth Providers? #86
Unanswered
jonathanunes1991
asked this question in
Q&A
Replies: 1 comment
-
To complement... I've created an interface to make it easier to consume the requests: const client = new Client({ url: 'URL' }).setLoggerSeverity(2).setDebug(true)
export const clientPost = <ResponseMapper, ResponseServer>({
url,
data,
options,
format
}: ClientPost<ResponseMapper, ResponseServer>) =>
client
.createRequest<ResponseServer>()({
method: 'POST',
endpoint: url,
options
})
.setData(data)
.setResponseMapper<ResponseMapper>((response) => ({
...response,
data: (format && response?.data ? format(response.data) : response?.data) as ResponseMapper
})) const postSignIn = (data: PostSignInRequest) =>
clientPost<PostSignInResponse, PostSignInServerResponse>({
url: '/security/account/login',
data
})
export const authService = {
postSignIn
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to use Hyper-Fetch along with Next-Auth, using Next.JS page routes.
When using the custom provider of Next-Auth, I need to make a POST call to a specific gateway... when making a call using HF, an error is displayed:
and after completing the request, the reported result is:
the call is made within the following file:
src\pages\api\auth\[...nextauth].ts
Could this issue be occurring because the call is being made on the server side? Or is there any configuration required to make this type of request?
I'm grateful for your support and guidance!
Beta Was this translation helpful? Give feedback.
All reactions