Skip to content

Commit

Permalink
added issuersWhitelist to fast-jwt example (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
msgadi authored Dec 17, 2024
1 parent 9800769 commit 7c02fee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getJwks = buildGetJwks({
ttl: 60 * 1000,
timeout: 5000,
issuersWhitelist: ['https://example.com'],
checkIssuer: (issuer) => {
checkIssuer: issuer => {
return issuer === 'https://example.com'
},
providerDiscovery: false,
Expand Down Expand Up @@ -101,6 +101,10 @@ const getJwks = buildGetJwks()

fastify.register(fjwt, {
decode: { complete: true },
issuersWhitelist: ['https://example.com'],
checkIssuer: issuer => {
return issuer === 'https://example.com'
},
secret: (request, token, callback) => {
const {
header: { kid, alg },
Expand Down

0 comments on commit 7c02fee

Please sign in to comment.