Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

same login page for both user & admin - combining now crashes system #557

Open
bigbadbrad opened this issue Aug 13, 2020 · 5 comments
Open

Comments

@bigbadbrad
Copy link

Hi, I left this on another thread, but it was closed so don't know if you saw it. Thinking about this more you do want the Register/Signup/Create Account button on the login page for admin and user. I'm just trying to understand how you suggest using this app - does one sub-domain point to npm run start:admin and a different one to npm run start:user ?

Ideally your entire app would land you on a page which has a Register button, and a Login. Here's an example in genetic testing:
https://secure.everlywell.com/login
https://secure.everlywell.com/register
Here's another where they are combined:
https://my.teloyears.com

Register would only work for type=user (admin is hard-coded), and you register (create an account) using a Kit# printed on your sample collection kit, in genetics.

Login is for both users and admin (that's the case for the two companies mentioned above). 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...

@FredericHeem
Copy link
Owner

Can you please elaborate on "the system really crashes" ?
Bear in mind that the login page is common for user and admin, but could be different in the future, the admin could force 2Fa for instance.
The main goal here is to avoid separate git repo for user and admin frontend.

@bigbadbrad
Copy link
Author

I log out of admin. Then login as alice. Then the screen goes crazy and flickers between this & that.

that

this

login_as_alice

@FredericHeem
Copy link
Owner

Thanks for the report, I'll investigate

@bigbadbrad
Copy link
Author

Hmm I thought maybe it was because I didn't update the server. I just did that but now it doesn't return users. Something to do with groups.
Screen Shot 2020-08-14 at 11 55 16 AM

@bigbadbrad
Copy link
Author

My bad - users didn't show up because I was still logged in as alice. Admin login works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants