Do server action responses get exposed to the browser?
Unanswered
Komondor posted this in #help-forum
KomondorOP
I'm currently architecting a way I can implement an auth token exchange in my application and prevent this token from being exposed.
For example, user wants to grant access to a 3rd party application that first requires them to be directed, log in/confirm the connect, and then redirected back with a valid auth token for future api requests to that 3rd party app.
My goal is to handle this flow with server actions, once the token is given, update the users information in the database but not return it. Is that possible or am I thinking of this wrong?
Cheers.
For example, user wants to grant access to a 3rd party application that first requires them to be directed, log in/confirm the connect, and then redirected back with a valid auth token for future api requests to that 3rd party app.
My goal is to handle this flow with server actions, once the token is given, update the users information in the database but not return it. Is that possible or am I thinking of this wrong?
Cheers.
2 Replies
@Komondor I'm currently architecting a way I can implement an auth token exchange in my application and prevent this token from being exposed.
For example, user wants to grant access to a 3rd party application that first requires them to be directed, log in/confirm the connect, and then redirected back with a valid auth token for future api requests to that 3rd party app.
My goal is to handle this flow with server actions, once the token is given, update the users information in the database but not return it. Is that possible or am I thinking of this wrong?
Cheers.
Do server action responses get exposed to the browser?Yes. It won’t be JSON but yes, it will be visible in the network tab
@joulev > Do server action responses get exposed to the browser?
Yes. It won’t be JSON but yes, it will be visible in the network tab
KomondorOP
I see so I could still do secure logic as long as I just return a status code or status complete response