Fix processing for prompt select_account with consent

Multiple prompt values are allowed and this change fixes the check for
select_account if it was used together with other prompt values. Where
select_account previously was ignored, it is now processed as required,
fixing the use case when a RP wants to trigger select_account first
while at the same time wants also to request interactive consent.
This commit is contained in:
Simon Eisenmann
2020-11-02 14:15:18 +01:00
committed by Ilja Neumann
parent 3cab05aa88
commit f063d2f9a3
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
Bugfix: Allow consent-prompt with switch-account
Multiple prompt values are allowed and this change fixes the check for
select_account if it was used together with other prompt values. Where
select_account previously was ignored, it is now processed as required,
fixing the use case when a RP wants to trigger select_account first
while at the same time wants also to request interactive consent.
https://github.com/owncloud/ocis/pull/788

View File

@@ -44,7 +44,7 @@ class Login extends React.PureComponent {
componentDidMount() {
const { hello, query, dispatch, history } = this.props;
if (hello && hello.state && history.action !== 'PUSH') {
if (query.prompt !== 'select_account') {
if (!query.prompt || query.prompt.indexOf('select_account') == -1) {
dispatch(advanceLogonFlow(true, history));
return;
}