Closed andriijas closed 6 years ago
just like this redux-auth?
nah i was thinking something simpler to get the current login in ant pro working. redux auth is overhaul for this project, includes material forms and other unnecessary stuff which will make it confusing for antd users.
ui of course use antd. Function similar? A simple manager?
yes, with example login guest/guest or similar, right now you can login by just going to url and even 404 is on logged in pages.
what do you think of adding basic auth that secures logged in pages, otherwise redicting to login and keep auth state in app model or similar. then api can subscribe to model state if there is auth token in there.
namespace: 'login',
state: {
status: undefined,
token: ............
},
other model:
import { fakeChartData } from '../services/api';
const response = yield call(fakeChartData, payload);
How can I wrap fakeChartData to send token from login model?
see #298 @andriijas
It would be nice if this project includes how to work with api tokens, when user login it can be saved in app model or user model and somehow used with services / utils/request
thanks