import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
auth0_management_api: {
type: "app",
app: "auth0_management_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.auth0_management_api.$auth.domain}/userinfo`,
headers: {
Authorization: `Bearer ${this.auth0_management_api.$auth.oauth_access_token}`,
},
})
},
})
Auth0 (Management API) uses OAuth authentication. When you connect your Auth0 (Management API) account, Pipedream will open a popup window where you can sign into Auth0 (Management API) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Auth0 (Management API) API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://{{custom_fields.domain}}/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
audience={{custom_fields.audience}}
POST
https://{{custom_fields.domain}}/oauth/token
accept: application/json
Content-Type: application/x-www-form-urlencoded
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
audience={{custom_fields.audience}}