How to access the Admin portal?
How do we deploy or access the admin portal?
Hey @subhendukundu,
Generally if you pass the adminPanel: true option in your Apiker constructor, it should register the following Admin panel routes:
https://github.com/hodgef/apiker/blob/70fe6a8f025cc97979aecb1b1b88d9ea522001d2/src/components/Admin/Admin.ts#L15
However, I think the panel feature might be currently broken since I recently changed how logging works (which affects many features of the panel). Before, all logging was saved in a single Durable Object (State) instance, and now we use an instance per IP which is more performant.
https://github.com/hodgef/apiker/commit/eed129f17b37d1d17a7eff75a70f4cbb4c5b5aae#diff-a7bd43ff2dfeaf5c57db069a318c79b0a48101199d2d7af4a35a5b89aa6f248cR35
Long story short: The basic panel we have now might be broken, so I will mark this as a bug and pick it up soonâ„¢.
Update: I have revamped the admin panel with some basic options.
It can:
-
Update/Delete users.
-
Ban/Unban an user ("app" ban, not Firewall/Cloudflare ban). Here's the difference:
- App ban: Ban that will be recorded for later use in the app. If you pass a
signedIpto this form, any further requests by that IP will return 401. You can pass any ID, such as an email, and in your app logic you can check for a ban usingisEntityBanned. - Firewall ban: Bans an IP in Cloudflare Firewall. For now only the "firewall" option (or the
firewallBanIPmethod) can issue a Cloudflare Firewall ban.
- App ban: Ban that will be recorded for later use in the app. If you pass a
-
Send emails. For example it can send a "forgot password" email to an user with a working password reset link. It can also send a "verify account" email with a working verify link. You can also do this from your app through
authRoutes.
Demo:
If you come across an issue, please feel free to file a ticket. Thanks!