0.4.8 • Published 3 years ago

@moxb/shards-accounts-flow-antd v0.4.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Shards - User Login workflow with Ant Design

This package provides a very basic solution for common user account workflows.

This is considered to be W.I.P.

Assumptions:

  • You are building a React application
  • Client-side routing is provided by Stellar Router
  • You want to use Ant Design for the UI

Features

  • If the user is trying to access a restricted part of the application, and is not logged in, he will be automatically redirected to the login form.
  • User login, registration, password reset request and password reset are supported.
  • After successful login, the user is redirected to the original location he tried to visit.

Quick start

Client side:

Basic app integration:

// This is for routing, not for accounts
import {SimpleLoginApp} from './WithLoginFlow';

const routingStore = createRoutingStore();

// you need to bring your Auth Backend
const authBackedn = new RandomAuthBackend();

// We will use this on the login form
const Splash = () => <h1>Welcome to my app!</h1>;

export const App = () => (
    <StellarRouterProvider store={routingStore}>
        <SingleLoginApp splash={<Splash/> backend={authBackend}}>
            <MainAppLayout/>
        </SingleLoginApp>
    </StellarRouterProvider>
);
  • It's also possible to arrange it so that some part of the app is available without login, but a restricted part is not. In that case, wrap the root of the app with <WithLoginFlow>, and the restricted part with <OnlyUsers>.
  • There is also <LogoutButton /> that you can use for logging out.

See also

0.4.8

3 years ago

0.4.0-alpha.4

3 years ago

0.4.0-alpha.3

3 years ago

0.4.0-alpha.2

3 years ago

0.4.0-alpha.0

3 years ago

0.4.0-alpha.7

3 years ago

0.4.0-alpha.5

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.3.96

3 years ago

0.3.95

3 years ago

0.3.93

3 years ago

0.3.92

3 years ago

0.3.81

3 years ago

0.3.80

3 years ago

0.3.79

3 years ago

0.3.78

3 years ago

0.3.77

3 years ago

0.3.75

3 years ago

0.3.74

3 years ago

0.3.73

3 years ago

0.3.72

3 years ago

0.3.71

3 years ago

0.3.70

3 years ago

0.3.69

3 years ago

0.3.68

3 years ago

0.3.67

3 years ago

0.3.66

3 years ago

0.3.65

3 years ago

0.3.64

3 years ago

0.3.62

3 years ago

0.3.61

3 years ago

0.3.60

3 years ago

0.3.59

3 years ago

0.3.58

3 years ago

0.3.57

3 years ago

0.3.55

3 years ago

0.3.54

3 years ago

0.3.52

3 years ago

0.3.50

3 years ago

0.3.49

3 years ago