Skip to content

Commit 9cd102f

Browse files
add how to use Auth
- also remove old Auth
1 parent 6bb384a commit 9cd102f

File tree

3 files changed

+5
-54
lines changed

3 files changed

+5
-54
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ For Production:
209209
}, [fetchUser]);
210210
```
211211

212+
- How to use Auth feature
213+
- If you want to build an admin page, with authorize full layout, just go to line **50** at `src/layouts/main.tsx` and use the code inside comment.
214+
- **Auth** component is a feature help authorize page by fetching profile each time page rendered.
215+
- You must have a server API to use this feature. This API with simple function like receive a header token, return user profile if token is valid and return 404 if token is expired.
216+
212217
---
213218

214219
## Tips

src/components/hoc/withAuth.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/store/actions/auth.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)