Getting user_metadata with auth0-spa-js?

So, I found i was able to get the roles if I hit the v2 api:
mysite.auth0.com/api/v2/users/[user id]/roles

However, it required a BearerToken that expires.

Looking at this page, it seems like I have to make a post everytime I need to get this token?

Is this really going to generate a new token everytime someone hits the page?

I’m using Angular and it is getting really frustrating because it seems like this is all node based and not actually SPA based. Do I need to redo my application’s authentication in order to work with Auth0? I want to use the auth0-spa-js because it seems like that’s what its written for.

This seems like a serious hurdle to overcome if I have to implement my own node api backend for these types of calls.

1 Like