We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fea194 commit ed81854Copy full SHA for ed81854
packages/sdk-middleware-auth/src/build-requests.js
@@ -94,8 +94,13 @@ export function buildRequestForRefreshTokenFlow () {
94
}
95
96
export function buildRequestForAnonymousSessionFlow (
97
- options: AuthMiddlewareOptions = {},
+ options: AuthMiddlewareOptions,
98
): BuiltRequestParams {
99
+ if (!options)
100
+ throw new Error('Missing required options')
101
+
102
+ if (!options.projectKey)
103
+ throw new Error('Missing required option (projectKey)')
104
const pKey = options.projectKey
105
// eslint-disable-next-line no-param-reassign
106
options.oauthUri = options.oauthUri || `/oauth/${pKey}/anonymous/token`
0 commit comments