Next.js Discord

Discord Forum

Server Side authentication

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
I want to make a request to the service and login the user before the pages are loaded on the server side. I will send certain data to the API. I will not receive information from the client side. I want to use an iron session structure. When the user enters the application, he will be logged in. The values I will send to the API will be values such as ip. The service will return me a token and a uuid.

6 Replies

Burmese
What
Sloth bearOP
I want to make a request to an api on the server side and log in with the token from the api.
The data I send to the API will be the same.
Burmese
Okay, so make a server-side request to your API, iron session setup, server-side login
You haven't asked anything, just made statements
Sloth bearOP
Okay, I get what you're saying.