Skip to content

Commit

Permalink
fix: increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
demetriusfeijoo committed May 14, 2024
1 parent 0fe77ec commit f5bc19e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@storyblok/app-extension-auth",
"description": "A typed JavaScript library for handling authentication with Storyblok apps.",
"version": "1.0.2",
"version": "1.0.3",
"author": {
"name": "Johannes Lindgren",
"email": "[email protected]"
Expand Down
12 changes: 10 additions & 2 deletions src/storyblok-auth-api/handle-requests/openidClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseClient, Issuer } from 'openid-client'
import { BaseClient, Issuer, custom } from 'openid-client'
import { redirectUri } from './redirectUri'
import { AuthHandlerParams } from '../AuthHandlerParams'
import { getRegionUrl, Region } from '@storyblok/region-helper'
Expand Down Expand Up @@ -26,11 +26,19 @@ export const openidClient: CreateOpenIdClient = (params, region) => {
? `${getRegionUrl(region)}/oauth/user_info`
: undefined,
})
return new Client({

const client = new Client({
token_endpoint_auth_method: 'client_secret_post',
client_id: clientId,
client_secret: clientSecret,
redirect_uris: [redirectUri(params)],
response_types: ['code'],
})

// eslint-disable-next-line functional/immutable-data
client[custom.http_options] = () => {
return { timeout: 10000 }
}

return client
}

0 comments on commit f5bc19e

Please sign in to comment.