mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-02 19:50:44 +05:30
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import AuthFlow, { ActionsDict, AuthContext as TAuthContext } from './AuthFlow';
|
|
|
|
import * as actions from 'app/components/auth/actions';
|
|
|
|
const availableActions = {
|
|
updateUser: actions.updateUser,
|
|
authenticate: actions.authenticate,
|
|
activateAccount: actions.activateAccount,
|
|
removeAccount: actions.removeAccount,
|
|
logout: actions.logout,
|
|
goBack: actions.goBack,
|
|
redirect: actions.redirect,
|
|
login: actions.login,
|
|
acceptRules: actions.acceptRules,
|
|
forgotPassword: actions.forgotPassword,
|
|
recoverPassword: actions.recoverPassword,
|
|
register: actions.register,
|
|
activate: actions.activate,
|
|
resendActivation: actions.resendActivation,
|
|
contactUs: actions.contactUs,
|
|
setLogin: actions.setLogin,
|
|
setAccountSwitcher: actions.setAccountSwitcher,
|
|
setErrors: actions.setErrors,
|
|
clearErrors: actions.clearErrors,
|
|
oAuthValidate: actions.oAuthValidate,
|
|
oAuthComplete: actions.oAuthComplete,
|
|
setClient: actions.setClient,
|
|
resetOAuth: actions.resetOAuth,
|
|
resetAuth: actions.resetAuth,
|
|
setOAuthRequest: actions.setOAuthRequest,
|
|
setOAuthCode: actions.setOAuthCode,
|
|
requirePermissionsAccept: actions.requirePermissionsAccept,
|
|
setScopes: actions.setScopes,
|
|
setLoadingState: actions.setLoadingState,
|
|
};
|
|
|
|
export type AuthContext = TAuthContext;
|
|
export default new AuthFlow(availableActions as ActionsDict);
|