⚡ Quickstart
Make sure, you get your platform credentials first as described on the Setup page. Now let's integrate Trusted Accounts on your platform.
Install library
First, install the library of your choice. See a list of libraries on the Setup page.
Library
This example uses the passport library. You can also use any other OAuth/OpenID Connect library.
npm install openid-client
Discover config
Then discover the Trusted Accounts configuration using the published .well-known endpoints.
import { Issuer } from 'openid-client';
const trustedIssuer = await Issuer.discover('https://auth.trustedaccounts.org');
console.log('Discovered issuer %s %O', trustedIssuer.issuer, trustedIssuer.metadata);
You should now see an output like this in your console. This means you are now ready to send requests to the Trusted Accounts API.
Discovered issuer https://auth.trustedaccounts.org/ {
claim_types_supported: [ 'normal' ],
claims_parameter_supported: false,
grant_types_supported: [
'authorization_code',
'implicit',
'client_credentials',
'refresh_token'
],
[...]
}
You are all set up. Let's authenticate a Trusted Account.