mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Throw error when trying to complete interaction out of session
This commit is contained in:
@@ -183,6 +183,13 @@ export class IdentityProviderHttpHandler extends HttpHandler {
|
||||
}
|
||||
|
||||
if (result.type === 'complete') {
|
||||
if (!oidcInteraction) {
|
||||
// Once https://github.com/solid/community-server/pull/898 is merged
|
||||
// we want to assign an error code here to have a more thorough explanation
|
||||
throw new BadRequestHttpError(
|
||||
'This action can only be executed as part of an authentication flow. It should not be used directly.',
|
||||
);
|
||||
}
|
||||
return await this.interactionCompleter.handleSafe({ ...result.details, request, response });
|
||||
}
|
||||
if (result.type === 'response' && route.responseTemplate) {
|
||||
|
||||
Reference in New Issue
Block a user