mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-29 18:56:36 +00:00
feat: improve initial admin creation workflow
This commit is contained in:
@@ -114,6 +114,11 @@ export default class UserService extends APIService {
|
||||
return res.data as User;
|
||||
}
|
||||
|
||||
async signupInitialUser(data: UserSignUp) {
|
||||
const res = await this.api.post(`/signup/setup`, data);
|
||||
return res.data as User;
|
||||
}
|
||||
|
||||
async listSignupTokens(options?: SearchPaginationSortRequest) {
|
||||
const res = await this.api.get('/signup-tokens', {
|
||||
params: options
|
||||
|
||||
@@ -12,7 +12,7 @@ export function getAuthRedirectPath(path: string, user: User | null) {
|
||||
path == '/lc' ||
|
||||
path.startsWith('/lc/') ||
|
||||
path == '/signup' ||
|
||||
path.startsWith('/signup/') ||
|
||||
path == '/signup/setup' ||
|
||||
path.startsWith('/st/');
|
||||
const isPublicPath = ['/authorize', '/device', '/health', '/healthz'].includes(path);
|
||||
const isAdminPath = path == '/settings/admin' || path.startsWith('/settings/admin/');
|
||||
|
||||
Reference in New Issue
Block a user