Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Improve code examples (some OAuth implementation details are missing in these examples)
  • Loading branch information
kidGodzilla authored Dec 17, 2024
1 parent fecbe75 commit 145395f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/oauth/oauth-client-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,21 @@ const client = new NodeOAuthClient({
policy_uri: 'https://my-app.com/policy',
redirect_uris: ['https://my-app.com/callback'],
grant_types: ['authorization_code', 'refresh_token'],
scope: 'atproto transition:generic',
response_types: ['code'],
application_type: 'web',
token_endpoint_auth_method: 'private_key_jwt',
token_endpoint_auth_signing_alg: 'RS256',
dpop_bound_access_tokens: true,
jwks_uri: 'https://my-app.com/jwks.json',
},

// Used to authenticate the client to the token endpoint. Will be used to
// build the jwks object to be exposed on the "jwks_uri" endpoint.
keyset: await Promise.all([
JoseKey.fromImportable(process.env.PRIVATE_KEY_1),
JoseKey.fromImportable(process.env.PRIVATE_KEY_2),
JoseKey.fromImportable(process.env.PRIVATE_KEY_3),
JoseKey.fromImportable(process.env.PRIVATE_KEY_1, 'key1'),
JoseKey.fromImportable(process.env.PRIVATE_KEY_2, 'key2'),
JoseKey.fromImportable(process.env.PRIVATE_KEY_3, 'key3'),
]),

// Interface to store authorization state data (during authorization flows)
Expand Down

0 comments on commit 145395f

Please sign in to comment.