Hi,
I have a fully working setup with Auth0+Spring Boot+Angular running.
Now I am trying to get some more info from the logged in User in the Backend (Spring Boot).
First I am trying to get the Bearer-Token:
Url: https://xxx.xx.auth0.com/oauth/token
Header(“content-type”, “application/json”)
Body(“{"client_id":"XXXX","client_secret":"XXXXXXX”,"audience":"XXXXX","grant_type":"client_credentials"}")
This is working and I am getting a long String seperated by dots as a Result (-> TOKEN).
I am using this String as a Bearer-Token for the next Request.
This could be either this Url: https://XXX.xx.auth0.com/userinfo
or that:https://XXX.xx.auth0.com/api/v2/users/ID
with the Header:
Header(“authorization”, "Bearer " + TOKEN)
Both Urls are resulting in unauthorized (Bad audience).
Can somebody please help me!
Best,
Peter