# How to Do Login & Authenticator in TiNG?

**URL:** <https://forum.servoy.com/t/how-to-do-login-authenticator-in-ting/20892>\
**Category:** Feedback\
**Created:** [October 27, 2022, 12:57am UTC](https://forum.servoy.com/t/how-to-do-login-authenticator-in-ting/20892 "2022-10-27T00:57:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john1598360627](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@john1598360627](https://forum.servoy.com/u/john1598360627)\
**Post date:** [October 27, 2022, 12:57am UTC](https://forum.servoy.com/t/how-to-do-login-authenticator-in-ting/20892/1 "2022-10-27T00:57:01Z")

</div>

I’m trying to figure out how to properly setup the Login Form and Authenticator in TiNG.

On my main solution, this is what I gather are the options.

**SOLUTION**

- firstForm
- loginForm
- loginSolutionName
- mustAuthenticate

From what I’m understanding, the firstForm appears… but if a loginForm is chosen THAT will appear before the firstForm IF ‘mustAuthenticate’ is toggled on.

Also, I assume ‘loginSolutionName’ is deprecated, since Login & Authenticator Solution types are to be deprecated.

WHAT I WANT TO DO  
What I want to do is;

1. Set a loginForm that is a formcontainer

- a form container as the login form, so I can have multiple forms related to login.
- login, reset password

1. ONLY Authenticate when login is successful

- What is the code for confirming the authenticator?

1. Switching to the ‘firstForm’ after authentication

- does switching to firstForm happen automatically after authentication?

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [October 27, 2022, 6:54am UTC](https://forum.servoy.com/t/how-to-do-login-authenticator-in-ting/20892/2 "2022-10-27T06:54:06Z")

</div>

Hi John,

the steps you planned out for login are exactly right.  
You are correct that you don’t need the loginSolutionName as NG doesn’t require a separate login/auth module from a security perspective.

As for step 2 and 3  
Once you checked everything you need to check in order to verify the user, you simply call security.login() which takes 3 parameters. (Please see security node in the solution explorer)  
After this the solution will automatically switch to the application ‘firstForm’

Example on login: security.login(‘user@domain.com’, application.getUUID(), [‘User’])  
As a note on the array of groups (last parameter): the named group(s) must actually exist on the server to make the login successful.  
You can find any of the groups available in the ‘User and group security’ in the solution explorer.  
Also make sure you will import the required groups when deploying.

Side note:  
I’ve recently opened a case on this, because there’s currently no warning in the application log when you try to login using a non-existing group.  
[https://support.servoy.com/browse/SVY-17557](https://support.servoy.com/browse/SVY-17557)

Hope this helps

---

<div class="post-metadata">

**Author:** ![john1598360627](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@john1598360627](https://forum.servoy.com/u/john1598360627)\
**Post date:** [October 28, 2022, 12:34am UTC](https://forum.servoy.com/t/how-to-do-login-authenticator-in-ting/20892/3 "2022-10-28T00:34:23Z")

</div>

> mboegem:  
> Hi John,
> 
> the steps you planned out for login are exactly right.  
> You are correct that you don’t need the loginSolutionName as NG doesn’t require a separate login/auth module from a security perspective.
> 
> As for step 2 and 3  
> Once you checked everything you need to check in order to verify the user, you simply call security.login() which takes 3 parameters. (Please see security node in the solution explorer)  
> After this the solution will automatically switch to the application ‘firstForm’
> 
> Example on login: security.login(‘user@domain.com’, application.getUUID(), [‘User’])  
> As a note on the array of groups (last parameter): the named group(s) must actually exist on the server to make the login successful.  
> You can find any of the groups available in the ‘User and group security’ in the solution explorer.  
> Also make sure you will import the required groups when deploying.
> 
> Side note:  
> I’ve recently opened a case on this, because there’s currently no warning in the application log when you try to login using a non-existing group.  
> [https://support.servoy.com/browse/SVY-17557](https://support.servoy.com/browse/SVY-17557)
> 
> Hope this helps

Thank you so much for explaining this! ![:mrgreen:]( "Mr. Green")
