Should I implement Auth0 on my Laravel backend or my frontend Nuxt.js application?

I have 2 seperate applications.

One is a Laravel application, which serves as a backend API on api.mysite.com. The other is a Nuxt.js application, which lives on the main domain mysite.com and completely depends on communicating with the backend API.

I’m kind of unsure on how to implement Auth0, on my Laravel backend or my Nuxt.js app?

Hi @acdeux,

Welcome to the Community!

You can implement it on both. You can authenticate your users in the frontend, and protect your API calls with access tokens.

Nuxt.js + Auth0

Laravel API + Auth0

Further reading about the architecture.

Hope this helps!
Dan

Hi @dan.woda,

Thanks for your reply.

I rather don’t use Auth0’s authorization services yet. I’m still on the free plan and 1000 API calls (machine 2 machine) a month isn’t really enough I guess. I’m expecting to be having around 50 API calls a day for now. That quickly adds up, or am I understanding things wrong?

I have succesfully implemented the Authorization Code Grant to my Nuxt app, when logging in I want to “talk” with my extern Laravel API, now how do I make sure Laravel knows the user that’s logged in?

Appriciate your help.

Amir

That should not count towards your quota. M2M calls are ones that originate with a client credentials grant, and have not user interaction. See this post for a thorough explanation and let me know if you have questions:

Send the API the access token, if it is valid and not expired, then return the resource.

So if I understood it correctly: M2M calls are only counted when using the client credentials grant AND the API that’s getting used is a custom one?

So basically I can hit the Mangement Api, which is a system one, as many times as I like, without it counting as M2M requests? No matter wether i’m using Credentials or Authorization Code grant.

That is correct. Getting tokens for the management API should not count towards your quota.

@dan.woda Cool, thanks!

Quick last question, the Free plan supports up to 7000 active external users. The Developer plan states it starts with 1000, but includes all Free plan features. Does that mean the Developer plan starts with 8000 active users for $23/mo?

Using the same logic, does the Developer Pro starts with 8100 active users for $28/mo? (Developer plan + 100 extra)

You really helped me out so far, thank you.

The user numbers are the total. They do not stack from the previous tier. i.e. dev tier allows for a total of 1000 MAUs, not 7000 + 1000.

Sorry for the confusion.

Oh really? What’s with the Free plan starting with more MAU’s than the paid plans? Isn’t that kind of unlogical?

The free plan is more feature-lite. Although you can have more users than the base dev tier, you don’t get things like custom domains, database migration, etc.

The dev and dev pro tiers allow you to have a fully customizable solutions, feature rich, and pay for the amount of users you have. You can start with 1k users and scale up when necessary.

If you want to dive into the differences it would probably be best to talk to the sales team, they have a deeper understanding of the pricing differences, how to scale price-wise, etc. If you want to do that, use the Talk To Sales button in the top right.

We typically deal with more technical questions here in the Community, but I am always happy to help with anything I can. Let me know if you have more questions about it!

Hi @dan.woda, clear answer. Thank you.

I don’t have any more questions, but I do have an issue which I started another thread for:

Receiving 401 Unauthorized when calling Management API using Authorization Code Grant Flow

Appriciate you’re time and help!

Ah yes, I will take a look at it. I apologize for the delay.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.