fix: 🐛 add state to oidc form (#1491)

This commit is contained in:
Dharini Jeeva authored and GitHub committed 2022-11-22 12:06:49 -08:00
1 parent 7120a5c54e
commit 2b3f9b3cf0
1 file changed
+7 -1
+7 -1
View File
@@ -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 } }) => {