# User Login Approach

**URL:** <https://forum.inductiveautomation.com/t/user-login-approach/112242>\
**Category:** Ignition\
**Tags:** ignition81, vision, scripting, perspective\
**Created:** [November 17, 2025, 8:06pm UTC](https://forum.inductiveautomation.com/t/user-login-approach/112242 "2025-11-17T20:06:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nolan.pratt](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nolan.pratt/32/78503_2.png) [@nolan.pratt](https://forum.inductiveautomation.com/u/nolan.pratt)\
**Post date:** [November 17, 2025, 8:06pm UTC](https://forum.inductiveautomation.com/t/user-login-approach/112242/1 "2025-11-17T20:06:29Z")

</div>

I am wanting to introduce a programmatic approach to signing in a user using a proprietary login form I created in Perspective. I've set up the functionality to create a new account that ties the user credentials to a User Source that is tied to the default Ignition IdP, and I now want to use a secondary view to sign a user in once they've validated their new account credentials.

I am seeing that the method `system.perspective.login([sessionId], [pageId], [forceAuth])` exists that simply redirects users to an embedded login form that performs the action I am wanting to integrate myself, so I essentially want to recreate this same login validation logic using the custom Perspective view I've created that prompts the default IdP with the user credentials entered.

After reviewing the documentation online, I see that the session properties are read only, so I'm hoping there's a method call that accomplishes this. I did find that the Vision method `system.security.switchUser(username, password, [event], [hideError])` seems to work as a solution within Vision scoped projects, but I cannot find a compatible Perspective solution for my use case.

For instance, I would make a call like this once a user enters their credentials and presses the login button:

```Python
username = str(self.getSibling("username").props.text)
password = str(self.parent.getChild("password-container").getChild("password").props.text)
try:
	if system.security.validateUser(username, password, 'default'):
		userObj = system.user.getUser('default', username)
		try:
			usernameVal = userObj.get('username')
			passwordVal = userObj.get('password')
			system.security.switchUser(usernameVal, passwordval, event)
		except Exception as e:
			system.perspective.print('Error collecting user data -> ' + str(e))
	else:
		system.perspective.print("Authentication failed for username: {}".format(username))
except Exception as e:
	system.perspective.print("Authentication block encountered an unhandled exception for user entry: {} -> {}".format(username, str(e)))

```

Any thoughts on a solution here?

Example Sign In / Sign Up form:

 ![Sign Up](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f6f1153796af75e8b227b5e044a6c26f5515f5e7.jpeg)  
 ![Sign In](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac0a2e2e3527d7854487b853bd1e680b2ffc06a6.jpeg)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 17, 2025, 8:15pm UTC](https://forum.inductiveautomation.com/t/user-login-approach/112242/2 "2025-11-17T20:15:36Z")

</div>

You need to write your own Identity Provider that conforms to the SAML standard. I highly doubt it is possible to use a Perspective view as an IdP.

---

<div class="post-metadata">

**Author:** ![nolan.pratt](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nolan.pratt/32/78503_2.png) [@nolan.pratt](https://forum.inductiveautomation.com/u/nolan.pratt)\
**Post date:** [November 17, 2025, 8:51pm UTC](https://forum.inductiveautomation.com/t/user-login-approach/112242/3 "2025-11-17T20:51:56Z")

</div>

> [@pturmel](#):
>
> write your own Identity Provider

The amount of work to make that functional when the default Ignition IdP endpoint already consumes a username and password field for authenticating an account seems obstinate.

Is there not some method to simply pass the credentials to the IdP endpoint for validating against the credentials collected from the Perspective view? If not, do you know why this is the case?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 17, 2025, 11:24pm UTC](https://forum.inductiveautomation.com/t/user-login-approach/112242/4 "2025-11-17T23:24:19Z")

</div>

It's not a part of the IdP standard, which is not our invention. It's a (set of) accepted standards.
