switch database in login screen

switch database in login screen

  

Hello!


I'm trying to make my personal database for my app(OK), and I want to make a login screen with this database, but the login screen it's already created and I only want to switch the database.

Thanks all!

ps: Sorry for my bad english :x

Hi Rubens,

I'm not sure what you are trying to achieve. Are you talking about a Web App or a Mobile App? What kind of "personal database" you are talking about? In what way do you interface with it? What does the login screen have to do with the database? What kind of "database switch" you have in mind?

If I'm not wrong,

Rubens want to create a login(Doesn't matter mobile/web app) with external database connectivity.

The username and password will be verified from that external DB.

Currently, there is a Server action "DoLogin", Which is verifying user from the system DB.

So instead of that, He wants to use his users which are stored in external DB.


I also want to achieve the same functionality. So looking for it.

If above conditions are true, then you need to create an extension which will connect to external database and import your entities.

Reference those entities in your application.

In login screen action  compare your userid and password with external entity. If it matches then allow user to login else don't allow.

@Amol: it's fine to login via some external service, but you'll also want to login to OutSystems, as you'll lose Role-based access otherwise, which isn't a smart thing to do. Also, even if you login via an external service, you're still bound to the number of named users your licence specifies.

Hey Guys,


It's a mobile app. I just want change the main db in the login screen, just like @Amol says.

The DB "usuarios" is the default, I want to switch for "Paciente", but I don't know where I can switch.

(pics)

Hi Rubens,

Unfortunaty it seems the RAR file is corrupted, I cannot open it.

Rubens I think you are mixing some concepts here

First the Usuários table that you are talking about is the system User's table (platform internal table)

To have the login process use other User Provider for the mobile app, which I'm not sure if is what you want to do to be honest...

You may want to dig a bit in here

Best regards,

PC

Hello Rubens,

I think you're doing some confusion here...
Are the "pacientes" entity an external entity? Or you created it in the server and it is a "normal" entity.

If it is the second, than you shouldn't worry, and use the User entity (you called Usuarios). This is the default entity and everything will work smothly with it, out of the box.

Trying to use a different entity to store your users is not advisable, by the reasons already given by Kilian.

If this entity is an EXTERNAL entity that you consumed through an extension, and you want to use it to authenticate your users, you will loose access to a lot of functionality if you do not login in the system using the standard precedure.

What is the case?

Eduardo Jauch wrote:

Hello Rubens,

I think you're doing some confusion here...
Are the "pacientes" entity an external entity? Or you created it in the server and it is a "normal" entity.

If it is the second, than you shouldn't worry, and use the User entity (you called Usuarios). This is the default entity and everything will work smothly with it, out of the box.

Trying to use a different entity to store your users is not advisable, by the reasons already given by Kilian.

If this entity is an EXTERNAL entity that you consumed through an extension, and you want to use it to authenticate your users, you will loose access to a lot of functionality if you do not login in the system using the standard precedure.

What is the case?


Hello Eduardo!

It is the first case, but I don't know if I switch for the second case it'll change the whole application.


Hey Kilian,

The pic is working now?


Just making better my question: Can I add more entity atribute in the User's table (platform internal table)?

Tahanks all!

Hello Rubens,

In this case, keep using the User (Usuarios) entity. It is a system entity, so you can't add attributes to it. But you can Extend it.

To extend, create a new entity, change the id to UserId (User identifier), and add your new attributes.

Noe you have an extension entity.

This is explained in the online training, so I assume you didn't it yet.

I strongly recommend the Online training to ypu to have a better understanding on how to use the platform.

Cheers

Hey Eduardo!

Where can I find the online trainig that tells me how to extend?

If it is extended, can I log-in the mobile application with the credentials created in that entity?


Cheers

Why would you want to login with credentials created in an extension of the entity used to store the credentials of users in OutSystems? :)

Just store the credentials in User and use it normally :)

You have a username and a password field. Do you need something else?

https://www.outsystems.com/learn/courses/82/build-a-mobile-app-in-2-hours/

https://www.outsystems.com/learn/courses/12/developing-outsystems-mobile-apps/

Cheers.