From 2b3f9b3cf02a6ca655eeeb86906ed6065d1525c6 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Tue, 22 Nov 2022 12:06:49 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20state=20to=20oidc?= =?UTF-8?q?=20form=20(#1491)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/mirage/config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index d8b1cd2b9..ed5b77368 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -73,7 +73,13 @@ export default function () { return resultSet.filter(makeBooleanFilter(filter)); } ); - this.post('/auth-methods'); + this.post('/auth-methods', function ({ authMethods }) { + const attrs = this.normalizedRequestAttrs(); + if (attrs.type === 'oidc') { + attrs.attributes.state = 'active-public'; + } + return authMethods.create(attrs); + }); this.get('/auth-methods/:id'); this.patch('/auth-methods/:id'); this.del('/auth-methods/:id', ({ authMethods }, { params: { id } }) => {