Skip to content

Commit 6563d3d

Browse files
committed
chore: bump authorizer-js to 3.2.1, import Protocol from SDK
1 parent f73c1d5 commit 6563d3d

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"typescript": "^5.7.2"
9292
},
9393
"dependencies": {
94-
"@authorizerdev/authorizer-js": "3.0.4",
94+
"@authorizerdev/authorizer-js": "3.2.1",
9595
"@storybook/preset-scss": "^1.0.3",
9696
"validator": "^13.11.0"
9797
}

‎src/contexts/AuthorizerContext.tsx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import {
77
useEffect,
88
ReactNode,
99
} from 'react';
10-
import { Authorizer, User, AuthToken } from '@authorizerdev/authorizer-js';
11-
12-
/** Wire protocol for public API calls. Matches the Protocol type in authorizer-js >= 3.1.0. */
13-
type Protocol = 'graphql' | 'rest';
10+
import { Authorizer, User, AuthToken, Protocol } from '@authorizerdev/authorizer-js';
1411

1512
import {
1613
AuthorizerContextPropsType,
@@ -148,8 +145,7 @@ export const AuthorizerProvider: FC<{
148145
authorizerURL: state.config.authorizerURL,
149146
redirectURL: redirectURLForSdk,
150147
clientID: state.config.client_id,
151-
// protocol is passed through to the SDK when @authorizerdev/authorizer-js >= 3.1.0.
152-
...(defaultConfig.protocol ? { protocol: defaultConfig.protocol as never } : {}),
148+
...(defaultConfig.protocol ? { protocol: defaultConfig.protocol } : {}),
153149
}),
154150
[
155151
state.config.authorizerURL,

0 commit comments

Comments
 (0)