Login Using Our own Db

Hi,

Is there any way to log in using our own DB table instead of using the System users table?

mvp_badge
MVP
Solution

Hi Aneena,

To make usage of the roles, screens permissions and all built-in security features in OutSystems you need to do the Login against Systems->Users. The alternatives you have:

1. All screens are anonymous and you need to create your own security mechanism (could be insecure, if you forgot any call you will expose your entities)


2. Combine both your external users and systems users. How to do it:  Your login action will validate user/PWD using your external users. (remember to keep your pwd encrypted) . if is ok, you will find the users using email/username or something else in the system's users. if there is a user you do the login using this one. If not exist yet, you can create the user, grant a default role and do log in using this new user.


regards

Fabio


@Fábio Fantato thank you for your reply. Is there any sample for the second option?

Thanks for the reply @Khuong Truong ,  I have already integrated external DB. And also created two screens ie the User listing and the User creation screen.


And added data using the user creation screen to my external DB User table.


I want to log in to my app using this external DB User table instead of System Users. 


mvp_badge
MVP
Solution

Hi Aneena,

To make usage of the roles, screens permissions and all built-in security features in OutSystems you need to do the Login against Systems->Users. The alternatives you have:

1. All screens are anonymous and you need to create your own security mechanism (could be insecure, if you forgot any call you will expose your entities)


2. Combine both your external users and systems users. How to do it:  Your login action will validate user/PWD using your external users. (remember to keep your pwd encrypted) . if is ok, you will find the users using email/username or something else in the system's users. if there is a user you do the login using this one. If not exist yet, you can create the user, grant a default role and do log in using this new user.


regards

Fabio


@Fábio Fantato thank you for your reply. Is there any sample for the second option?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.