I’m a bit stuck after lots of reading and trying. Once a user registers with Auth0 and logs in for the first time, I’d like to run a rule that makes an API request to my application to create a new user. The problem is that I need a valid JWT access token to hit my API. I thought that the access token and/or id token that the user receives once authenticating in my react app (and is subsequently used to make api requests) would be available in the rules… but it doesn’t appear to be.
-
Is the access token that the end user receives available in rules? If so, how do I get it? I’ve checked the
user
,context
,auth0
, andconfiguration
objects, but none seem to have what I need. -
If that user’s access token is not directly available in a rule, how do I obtain one? Do I need to make requests to
/oauth/(authorize|token)
to create one?
Just noticed that this appears to be a similar problem: Make a POST to API server using accessToken, after a user has registered
Thanks in advance.
~Philip