Demo for the qnipp:accounts-saml package
See the live demo on meteorapp.com.
Meteor.settings.saml
The demo client is based on React.
saml.getLoginLinks
method. See the example in import/ui/LoginLinks.jsx.Meteor.user()
method. See the example in import/ui/User.jsx.Accounts.onLoginFailure()
. See the example in import/ui/LoginState.jsx.Meteor.settings.public.saml.performPendingLoginManually
to true
and run performPendingLogin
on a proper place.See this example for the last point as part of the login form:
const [loginState, setLoginState] = useState({ state: 'loggedout' });
useEffect(() => {
const onLoginFailure = Accounts.onLoginFailure((error) => {
if (loginState.state === 'loggedout') {
// to distinguish SAML logins from password logins
setLoginState({ state: 'failure', error });
}
});
performPendingLogin();
return onLoginFailure.stop;
}, []);
See the README file of the package.