FredericHeem/starhackit

admin logout then login problems

Closed this issue · 2 comments

If you start the client app as admin:
npm run start:admin

This works now - thx!. If you log out of the app,
two buttons on the right appear: Login Register

two things:

  1. you probably wouldn't have Register button on an admin site.
  2. if you click on Login, you go to the USER login, which takes you away from the admin. When you login as admin, you end up on the user profile for admin.

But the login link below the Logged Out in the middle of the screen works.

Thanks a lot for the feedback, it is now fixed in #554
Let me know if you find any other issue.

Yes, that works thanks!

Thinking about this more you do want the Register/Signup/Create Account button there. Ideally your entire app would land you on a page which has a Register button, and a Login. Register would only work for type=user (admin is hard-coded). For example, in genetic testing you register (create an account) using a Kit# printed on your sample collection kit.

And based on what "kind" of user was logging in - a general user or admin, you get routed to either /user/profile or /admin/user. I think I saw in the code "groups".

But right now, if you npm run start:admin, logout, and then login as a general user, alice, the system really crashes. If you routed the user as they logged in, based on type, then you wouldn't need multiple npm run starts - just one.

Just some thoughts...