Skip to content

Commit

Permalink
Merge pull request #18 from collective/erral-multiple-oidc-providers
Browse files Browse the repository at this point in the history
allow using multiple oidc providers
  • Loading branch information
ericof authored Oct 22, 2024
2 parents a78f354 + 7d97eb4 commit abbd462
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ function Login({ intl }) {
}, [startedOAuth, loginOAuthValues]);

const onSelectProvider = (provider) => {
setStartedOAuth(true);
setCookie('return_url', getReturnUrl(location), { path: '/' });
dispatch(authomaticRedirect(provider.id));
if (provider.plugin === 'oidc') {
setStartedOIDC(true);
dispatch(oidcRedirect(provider.id));
} else {
setStartedOAuth(true);
dispatch(authomaticRedirect(provider.id));
}
};

useEffect(() => {
Expand Down

0 comments on commit abbd462

Please sign in to comment.