Both SPA and M2M for the same API server

Is it possible to configure Auth0 to handle both SPA and M2M in a single app?

This is my scenario:

I have a Feathers.js Server which receives heartbeats from several devices. They should login as M2M obviously since they usually restart from power outages

There’s another Vue.js webpage which retrieves the data from the Feathers.js server. This is where the client logs in, then retrieves the information abouth the heartbeats.

I don’t really understand how I should configure my feathers.js server. Should this be two different applications? The devices log in throw M2M and the users log in through an SPA? configure 2 different authentication methods inside feathersjs?

Sorry if I’m not clear enough, but the idea is to get M2M and SPA log in to the same Feathers.js API.

1 Like

I am wondering the same thing… Can anyone please help clarify?

Hi @chad.adams and @vallo61,

Sorry for the delay in response @vallo61.

Please take a look at this resource:

If we use this setup as a basis, can the API act like an aggregate of the other M2M connections? If that were the case it would be SPA -> API -> other devices. This would require multiple M2M connections and one SPA to API.

I think I could use some clarification on this one.

Thanks,
Dan