Next.js Discord

Discord Forum

[next-auth] Issue for <CLIENT_FETCH_ERROR>

Answered
skoozz posted this in #help-forum
Open in Discord
Hi to you!
I currently use next-auth for the management of my sessions: to know that I only use it for the Discord Providers.

Everything is well configured and the connection system works perfectly on PC whether in production mode or even development.

However, having passed my project in projection mode and having published it on my site https://dashboard.guildmanager.gg, it turns out that, only on mobile, the connection system sends me the following error: CLIENT_FETCH_ERROR.

It was possible that it was a route problem at the level of NEXTAUTH_URL but the latter is well configured on the good domain.

In addition, this problem which, I remind you, only happens on mobile, only happens on certain models: most iPhones (including me having the 14 Pro Max), it does not work.
However, some Android models work correctly.

I am attaching the various errors that I have encountered and I would have liked the help of one of you, developer, to solve my problem.

Thank you for your patience,
Skoozz
Answered by skoozz
I found an alternative that this one works.

Indeed, the redirection by the providers may not work sometimes on mobile.
Therefore, you have to get the login link from the domain, in my case: https://dashboard.guildmanager.gg/api/auth/providers and the link looks like https://dashboard.guildmanager.gg/api /auth/singin

It generates a connection link that works 100%.
I would have liked to have an automatic redirection without having to go through this gateway but as indicated, I redirected the "Login" button by https://dashboard.guildmanager.gg/api/auth/singin to be able to select the connection method Discord.
View full answer

1 Reply

I found an alternative that this one works.

Indeed, the redirection by the providers may not work sometimes on mobile.
Therefore, you have to get the login link from the domain, in my case: https://dashboard.guildmanager.gg/api/auth/providers and the link looks like https://dashboard.guildmanager.gg/api /auth/singin

It generates a connection link that works 100%.
I would have liked to have an automatic redirection without having to go through this gateway but as indicated, I redirected the "Login" button by https://dashboard.guildmanager.gg/api/auth/singin to be able to select the connection method Discord.
Answer