You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
I think that this is because we call auth0.WebAuth({ ... }) with audience: 'https://' + '#{auth0Domain}' + '/userinfo' - so we get back an opaque string instead of a JWT token as our access_token. The API cannot really get any useful information from this without performing some other calls, so to simplify things perhaps the id_token was used instead.
To make this clearer could we maybe either:
change the README.md to say that we're using the id_token to simplify the example, and that using the id_token for purpose is not really best practice
include a couple of pre-requisites stating that you'd need to have an API app setup in each tenant, modify the code so that it reads the expected audience for each of these APIs from the tenant store, and add placeholder entries into the tenants-sample.js with values like "TENANT1_API_AUDIENCE" and "TENANT2_API_AUDIENCE"
I am not 100% sure if my second suggestion makes sense (please let me know if I'm mistaken!) but we should at least correct the README, since it does say we're using the access_token when we are instead using the id_token.
The text was updated successfully, but these errors were encountered:
smcl
changed the title
id_token is when invoking API, documentation says access_token is
id_token is used when invoking API, README says access_token is
Feb 8, 2019
In the README.md we've got the following:
In reality though we use the
id_token
(see line 52 of the SPA/views/index.jade).I think that this is because we call
auth0.WebAuth({ ... })
withaudience: 'https://' + '#{auth0Domain}' + '/userinfo'
- so we get back an opaque string instead of a JWT token as ouraccess_token
. The API cannot really get any useful information from this without performing some other calls, so to simplify things perhaps theid_token
was used instead.To make this clearer could we maybe either:
tenants-sample.js
with values like "TENANT1_API_AUDIENCE" and "TENANT2_API_AUDIENCE"I am not 100% sure if my second suggestion makes sense (please let me know if I'm mistaken!) but we should at least correct the README, since it does say we're using the access_token when we are instead using the id_token.
The text was updated successfully, but these errors were encountered: