I am developing a site which has an admin panel too. The structure of my website is following.
application(front site)
controllers
views
models
admin
application
controllers
views
models
The problem occurs when I login to admin and on the same time I open front end in the same browser. It removes session for admin so admin logouts after opening front end.
Related
I am working on a laravel project in which from ADMIN panel I can log in in the user module, but when I want to go back from the browser the admin panel is not working means admin is logout. is there any method in which I can log in in both module admin and user.
If you log in as one user, you log out as the other.
I see 2 possibilities:
1) Make 2 user tables, with separate login/logout/etc. one for your frontend users, one for your admin panel.
The advantage here is that your regular users will never be able to login as an admin, because they don't exist in that table.
2) Separate your frontend and admin panel into 2 different projects. You can link them to the same database. Put the admin panel on a subsite admin.my-project.com.
The advantage here is that you seperate your logic between 2 projects, each focused on different functionality, with their own styling, layout and most important for your example: authentication.
Use an incognito browser window for your admin tasks, which will enable you to be logged in to the same app twice.
You could solve your problem with two possible ways that laravel provide and you could google about "laravel multi auth example".
Multiple authentications using "middleware"
Multiple authentications using auth "guards"
Here are two articles will help you to understand and show you the implement with an example:
Laravel 6 Multi Auth (Authentication) Tutorial
How to use multiple authentication guards in a Laravel app
I am using Laravel Voyager to develop an application. Users are added using admin account which has all the rights.
If a normal user whose role doesn't have access to browse users logs in to the application and tries to save his details after editing profile, gets a 403 forbidden error.
Is there any way in Voyager, through which I can set the redirect URL after user saves the data?
I am using Oracle APEX 5.0 on Oracle 12c. I have a situation where a user opens a link to an apex page from his email and he is redirected to the login page because there is no session exists.
e.g. the link that user clicks is:
http://host:port/apex/f?p=app_id:page:::::ITEM1,ITEM2:VAL1,VAL2
After clicking this link the user is moved to the login page. My question is after a successful login, how can we redirect him to the link he originally tried to access along with the parameters and values originally passed?
Yes, there's a way; follow this path:
Edit application properties >> Security tab >> Session management >> Deep linking >> set it to "Enabled"
From the documentation:
This attribute enables or prevents deep linking to an application.
Options include:
Enabled - The URL to a specific page ultimately redirects there, possibly after the user has to logged in.
Disabled - If the URL does not contain a valid session ID, Application Express redirects to the application's home page.
For example, browsers often save the URLs of opened tabs and try to
restore the sessions after a restart, causing a deep link. This
behavior may be undesirable (for example if a URL points to a page in
the middle of a multi-step wizard). By selecting Disable, Application
Express starts a new session and redirects to the application's home
page.
Note you can override this application setting at page-level.
I am building an e-commerce website which will require continuous updation of products, so for that I need t setup admin panel for the website. My app is based on MEAN stack. Now, I am confused on how to handle session for admin panel and website and also how to configure the admin panel. My application is almost ready only admin panel is left.
Do I need to handle sessions separately for admin panel and website and if yes how ? Currently I am using node-passport for sessions.
how can I use subdomain to open admin panel, for eg. I have a domain called www.abc.com, Now I want to use admin.abc.com and in that case I want to redirect user to the admin panel. How can I create sub domain ? and How can I handle this in my MEAN app ?
I am using joomla 3.0 and i want to when user open joomla 3.0 site then first open only login page then after login he can access website.
Thanks For Advance
You can put the site in offline mode.
So the site will display the login page.
Remember to grant permissions to the users to access the offline site!
If you want to "protect" the whole site with login the best option is to turn the site off and then the user will need to login after opening the intranet page. Its probably the cleanest way how to to it without modules/plugins.
As we are doing it in my company (we are also running intranet on Joomla!) is, that all the articles are set to registred and the landing page of intranet just contain warm welcome and login form.
One thing to mention: Forcing this login for viewing some article/other content is not secure at all, mostly the local instalation will run on database with root access without pass (default setting) and with unecrypted database easily accessible. This is something to consider. If you are running this intranet in small company with loyal employees or without sensitive information you should be fine if not you should put more stress on the security issues.