I'm curious how server actions work behind the scene like when we create a route handler we actually make edge functions which are executed when triggered.
@prayushawale817910 ай бұрын
hello great video. I have a question. How to implement refresh token in the server like when the access token expires and we get 401 error so we need to refresh the token and continue previous request.
@OktaDev10 ай бұрын
Thanks! The following post in our community forum should help answer your question: community.auth0.com/t/how-to-use-the-refresh-token-with-auth0-nextjs-auth0/126612
@agustinnunez71199 ай бұрын
hello great video! I have a question, what can i do when i need to get resources? I see the way to submit data and how to handle it, but what do I have to do when I need to call a GET method to get resources?
@nmdpa39 ай бұрын
action on a button does not work...have to wrap it in a form and put the action on the form
@CardoPixelado6 ай бұрын
Quick question, how do I get the user Auth0 roles in Next.js? for example to protect a route to only "Administrator"
@OktaDev4 ай бұрын
Hello! You can use Auth0 actions to customize either the ID token or the access token depending where you want to validate the access either in the FE, BE, or both. You can see how to do it here: auth0.com/docs/manage-users/access-control/sample-use-cases-actions-with-authorization#add-user-roles-to-tokens Once the roles are in the token you can access the ID and access tokens with the NextJS sdk. auth0.github.io/nextjs-auth0/types/session_get_access_token.GetAccessToken.html auth0.github.io/nextjs-auth0/functions/client_use_user.useUser.html Hope that helps, and thanks for watching!
@nicer219 ай бұрын
What fonts are those editor that presented are using ?
@patarebenezer9 ай бұрын
Is not working when call GET
@grinsk3ks10 ай бұрын
This doesn't make any sense. Why would you want a server action to "submit a form" instead of just doing a post request. Use the platform.
@nmdpa39 ай бұрын
It keeps you from having to expose api routes to submit data...the form data is processed in the action.ts and not via an api route that is available to everyone and must then be protected.
@GameZONE-vn9 ай бұрын
@@nmdpa3so the API is insecure? That is a bigger problem.
@GameZONE-vn9 ай бұрын
Yeah, that is so weird.
@SilvestreVivo10 ай бұрын
The same that Sveltekit has already for more than 1 year.