thefrontside / simulacrum

A simulation platform for use during testing, during development and for high-fidelity application previews
88 stars 14 forks source link

Auth0 respones mode form_post #226

Open esumerfd opened 1 year ago

esumerfd commented 1 year ago

I am testing with this against my dotnet mvc server for integration testing.

PORT=4000 npx auth0-simulator --standalone

The error

Error: Assert condition failed: unknown response_mode form_post

and the code

            let responseMode = ((_a = req.query.response_mode) !== null && _a !== void 0 ? _a : 'query');
            (0, assert_ts_1.assert)(['query', 'web_message'].includes(responseMode), `unknown response_mode ${responseMode}`);
            let handler = authorizeHandlers[responseMode];

seems to imply that this simulator doesn't support form_post as a response mode for authorization_code flow?

Is there something I am doing wrong here?

dagda1 commented 1 year ago

Hi @esumerfd ,

Thank you for raising this, but currently, we only support query and web_message.

I don't think it would be too much work to add form_post. We would need to add some middleware to decode the form fields.

Would it be possible to create some sort of reproduction repo or code sandbox on your end so I have an example to work against?