Using Next.js Server Actions to Call External APIs

  Рет қаралды 14,846

OktaDev

OktaDev

Күн бұрын

Пікірлер: 16
@c0mrad1_
@c0mrad1_ 10 ай бұрын
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.
@prayushawale8179
@prayushawale8179 10 ай бұрын
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.
@OktaDev
@OktaDev 10 ай бұрын
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
@agustinnunez7119
@agustinnunez7119 9 ай бұрын
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?
@nmdpa3
@nmdpa3 9 ай бұрын
action on a button does not work...have to wrap it in a form and put the action on the form
@CardoPixelado
@CardoPixelado 6 ай бұрын
Quick question, how do I get the user Auth0 roles in Next.js? for example to protect a route to only "Administrator"
@OktaDev
@OktaDev 4 ай бұрын
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!
@nicer21
@nicer21 9 ай бұрын
What fonts are those editor that presented are using ?
@patarebenezer
@patarebenezer 9 ай бұрын
Is not working when call GET
@grinsk3ks
@grinsk3ks 10 ай бұрын
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.
@nmdpa3
@nmdpa3 9 ай бұрын
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-vn
@GameZONE-vn 9 ай бұрын
​@@nmdpa3so the API is insecure? That is a bigger problem.
@GameZONE-vn
@GameZONE-vn 9 ай бұрын
Yeah, that is so weird.
@SilvestreVivo
@SilvestreVivo 10 ай бұрын
The same that Sveltekit has already for more than 1 year.
@UncleDavid
@UncleDavid 11 ай бұрын
yap yap yap zero coding
@akarshanmishra2351
@akarshanmishra2351 11 ай бұрын
yapper 0
Next.js Server Actions...  5 awesome things you can do
7:51
Beyond Fireship
Рет қаралды 290 М.
API Vs SDK! What's the difference?
4:52
ByteByteGo
Рет қаралды 76 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 266 М.
API vs SDK: What’s the Difference?
3:42
Klippa
Рет қаралды 18 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН
How GitHub's Database Self-Destructed in 43 Seconds
12:04
Kevin Fang
Рет қаралды 1 МЛН
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 41 М.
Is Next.js 15 any good? "use cache" API first look
8:16
Beyond Fireship
Рет қаралды 140 М.
What does '__init__.py' do in Python?
12:46
Tech With Tim
Рет қаралды 38 М.
shocking end 🥴🤯 LeoNata family #shorts TikTok
0:54
LeoNata Family
Рет қаралды 41 МЛН
для всей семьи
0:56
Стакановец
Рет қаралды 191 М.
КАК ЖИВЕТ КВАНТУМ? РУМ ТУР КВАНТУМА!!!
13:51
три кошака и ростелеком
0:26
Мистер Денала
Рет қаралды 2,4 МЛН